Skip to main content

Module cleanup

Module cleanup 

Source
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§

CleanupWorker

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.