Skip to main content

Module retention

Module retention 

Source
Expand description

Log retention on the worker (see archive/PROJECT.md, Task logs): logs older than [worker] log_retention (30 days by default) are deleted, and beyond [worker] log_max_size (no limit by default) the oldest go first. A log whose attempt is in the journal (running, or its result not yet acknowledged) is never deleted, though it counts towards the size limit. Parse logs (parse-<root>.log) follow the same rules.

A sweep runs when the worker starts and then every hour.

Structs§

LogRetention
What to keep.
Swept
What a sweep deleted.

Constants§

SWEEP_INTERVAL
How often logs are swept.

Functions§

sweep
Deletes from log_dir what retention doesn’t keep at now, sparing the logs of attempts in journal. A file that can’t be deleted is logged and counted as kept.
sweep_logs
Sweeps now and every interval until stop completes, recording the bytes kept and deleted in metrics.