You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: retain finished tasks for N days (opt-in) #286
Add optional, configurable retention of finished tasks: delete (or archive) tasks a configurable number of days after they finished, together with their owner rules. This bounds the database storage and the number of access control rules, whose count slows down every request (pre-release review of v0.3.0, finding 7).
Requirements
Opt-in: retention is a configuration option and is off by default. Many deployments need their tasks for accounting and audits and must keep them; others don't.
Only finished tasks (States.FINISHED) are affected, after N days since they finished (or since creation, for tasks without an end time).
The owner rules of deleted tasks are removed too. Task identifiers are still never reused (see _write_doc_to_db).
Optionally archive instead of delete (e.g., to another collection), to be decided.
Runs periodically (e.g., a Celery beat task or on startup), and is idempotent and safe with several instances.
Documented in docs/configuration.md.
Follow-up of the pre-release review of v0.3.0 (finding 6). Planned after the release.
Activity