Skip to main content

MAX_QUEUE_ERROR_BACKOFF

Constant MAX_QUEUE_ERROR_BACKOFF 

Source
pub const MAX_QUEUE_ERROR_BACKOFF: Duration;
Expand description

The longest a worker waits between attempts when the queue itself is failing — not a job.

Its own constant, and far shorter than DEFAULT_BACKOFF_CAP, because the two answer different questions. A job that failed is waiting on something of its own, and an hour is a reasonable thing to wait for it. A database that deadlocked, dropped a connection or failed over is back in seconds, and a worker that slept an hour afterwards would leave a healthy queue unattended for an hour.