mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
The hourly purge rethrew any error that was not the Guardian refusal, so the oldest due account, failing on every run, stopped every later erasure and the sweep of expired pre-wipe copies for good. Each account is now its own try: a failure is counted, reported through the worker error path with its first error, and told to the admins once per request (user.account.erasure_failed), and the run goes on. The pre-wipe sweep and the off-host kick run in a finally. Every account the run starts is marked in backup_pass_attempts under the purge's queue name and the mark closes only on erasure or when the account is no longer due, so an account that failed or was refused goes behind every other due account next time. The run stops starting accounts once its job budget is spent, since fifty erasures of up to two minutes each did not fit the queue's expiry.