mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The full rollup backfill refills each day's figures from the raw readings, and the dense fold deletes those readings once it has their hourly means. On a large account the backfill can run longer than the ten minutes the fold's boot job waits, and a year it reached after the fold had taken it would compute its days from hourly means: the day count, minimum and maximum of every folded day would change. The consolidation walk now asks a per-account deferUser hook before it reads an account, and both entries of the dense fold (the per-account boot job and the nightly drain) pass isRollupFullBackfillPending, which looks for a queued or running full fold of the account in pg-boss. The account is folded on a later run, once its rollup tier is rebuilt.