utils/sickdays/systemd/sickdays-sync.timer
Krzysztof kuhy Rudnicki 894d76f811 sickdays 0.1.0 + earned_time 0.11.0: uncapped sick-day pool, 20:00 sick shutdown floor
sickdays: per-date pool, no cap or reason, add/remove today or later only,
import_legacy for the migration. LWW state flip per date (no tombstones),
Firebase RTDB sickdays-sync/devices/<uuid>/sick_days.json, HMAC audit trail.
Readers fail closed (unreadable pool = not sick, logged); writers refuse a
corrupt pool. Free-day cross-check via a lazily imported freedays predicate.

earned_time: resolve(..., sick=True) floors the final shutdown at 20:00
(capped at the ceiling); gaming, terms and base unchanged. Result dataclasses
moved to _resolution.py for the line cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xfj1sxKH9VBPqpcAni8Jry
2026-10-16 08:23:00 +02:00

20 lines
709 B
SYSTEMD

[Unit]
Description=Sync the shared sick-day pool periodically
Documentation=file:///home/kuhy/src/utils/sickdays/README.md
[Timer]
# Every 15 minutes. A sick day marked on the phone should reach the PC well
# before the next gate fires, and the gates that run most often (wake-alarm
# every minute, the lockers every 5) read the *local* file, so this interval
# bounds staleness rather than gating anything.
OnBootSec=2min
OnUnitActiveSec=15min
# A laptop that was asleep at the scheduled tick should sync on waking, not
# silently wait another 15 minutes -- the overnight case is exactly when a
# day gets marked from bed and needs to be there by morning.
Persistent=true
[Install]
WantedBy=timers.target