mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The backfill route shared the analytics-read bucket and sent every explicit range without a key, so one account could queue two-year backfills until the instance-wide daily budget was gone for everyone. The route now allows three backfills a rolling hour per account (429 environment.backfill_rate_limited) and one queued backfill per twenty-minute slot, keyed on the account (409 environment.backfill_pending). Every fetch made for an account is also charged to that account's own share of the daily budget, one twentieth of it, so a refused request ends the run as budget-blocked and the nightly run continues.