Expand description
Expired-job cleanup worker.
CleanupWorker periodically deletes jobs whose expires_at has
passed. expires_at is stamped by
JobProcessor when a job enters a
final state, using the server’s configured succeeded_ttl /
failed_ttl. Running this out-of-band (rather than sweeping on every
enqueue) keeps the hot path O(1).
Structs§
Constants§
- DEFAULT_
CLEANUP_ INTERVAL - Default interval between cleanup sweeps.
- DEFAULT_
FAILED_ TTL - Default time-to-live for permanently-failed jobs.
- DEFAULT_
SUCCEEDED_ TTL - Default time-to-live for successfully completed jobs.