Habits: close days with the tracker, vacations and a pg-boss job #3
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/habits-day-closing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Trackeraggregate, one per user: time zone, week start, vacations (at most 90 days, never in the past, cut short when cancelled while running). A day closes at local midnight plus 3 hours, in order.habits.close_daysjob every 5 minutes on pg-boss. Per user and day it closes the tracker's day, judges each habit, then records the summary that announcesDayClosed. One transaction per step; each step is idempotent and an interrupted run is resumed. A user several days behind catches up, up to 7 days per run.jobslibrary: recurring jobs that never overlap across API instances, started after boot and drained on shutdown.Instant.startOfDayandTimeZone.offsetAt, tested across a daylight-saving change.Open question in
docs/contexts/habits.md: changing the week start after set-up.🤖 Generated with Claude Code