Skip to content

feat: retain finished tasks for N days (opt-in) #286

Closed

Description

@uniqueg

Summary

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

  1. added
    priority: medium
    status: triage
    type: feature
    workload: days
    on Oct 24, 2026
  2. modified the milestones: v1.0.0-rc1, v0.6.0 on Nov 1, 2026
  3. added
    status: in progress
    and removed
    status: triage
    on Nov 7, 2026
  4. removed
    status: in progress
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions