Skip to main content

MAX_DISPATCH_RETRIES

Constant MAX_DISPATCH_RETRIES 

Source
pub const MAX_DISPATCH_RETRIES: i64 = 1;
Expand description

The maximum number of dispatch retries before a perpetually-incomplete task is given up on. A task re-dispatched this many times that still never returns a result is treated as a hard failure (Fatal) rather than retried forever.

1 with the short lease_timeout_seconds (~240 s, just above the worker’s 180 s per-document timeout): a task whose worker keeps dying is almost always an unprocessable paper (a fresh recycle-clean worker dies on it too), so 2 retries (3 attempts total) catch the rare transient/worker-induced death and then converge to Fatal within a single run — the (retries+1)×180 backoff cumulates to (1+2+3)×180 ≈ 1080 s, well inside a corpus pass — instead of the old 4 retries × 3600 s that stranded the task for hours.