Data retention¶
What it does¶
The superadmin decides how long jobs and their files are kept. Once a job is older than the limit, a daily job removes it along with its stored files.
How it works¶
- The policy is set by the superadmin and stored in the database. A value of "keep forever" means nothing is deleted for that type of data.
- A preview shows what would be removed before anything is deleted.
- A daily run applies the policy at the hour set in the policy (midnight UTC by default).
- Files are cleaned up too. Stored files that no record refers to any more are removed, but only after checking nothing still points to them.
- Pay is not affected. The work ledger was written when the work happened, so removing a job does not change what was paid.
Before you change it¶
Changing the policy takes effect on the next daily run. Use the preview first.
For engineers
Routes: GET /admin/retention, PUT /admin/retention, POST /admin/retention/preview, POST /admin/retention/run.
Backend: app/retention.py (steps and orphan-file sweep), app/cron.py (daily schedule), app/routers_retention.py.
Full list: feature map.