Returned errors and crashes are different
A returned error consumesattempt. A panic, process loss, or expired lease consumes
crash_attempt. Poison-pill quarantine depends on that distinction. Panic recovery and
per-task isolation are enabled by the runtime so one handler cannot take down unrelated
work.
Retries use bounded backoff and store time. rate_limited and configured non-consuming
errors requeue without consuming an attempt. snooze reschedules intentionally, while
skip and revoke are terminal decisions.
Timeouts and deadlines
A task timeout bounds one attempt. A deadline bounds the useful lifetime of the job across attempts. The runtime cancels the handler when either expires, on shutdown, on operator cancellation, or when renewal reports a lost lease.Graceful shutdown and lease control
During graceful shutdown the worker stops admitting new jobs, lets in-flight work finish within the configured window, and keeps renewing those leases. Handlers for genuinely long operations can use the lease-control surface and report task tracking state. Sticky routing can prefer a named worker while retaining a fallback policy when it is unavailable.Terminal and suspect-job callbacks
archivedis the operational dead-letter queue for jobs that exhaust retries, are skipped, or pass their absolute deadline;- death handlers observe those jobs only after the archive transition is durable;
- stuck-job handlers receive runtime evidence about work that is no longer progressing;
- a suspect job can be moved behind healthy work without changing its attempt semantics;
- redrive returns selected archived jobs to execution through bounded operator operations;
- orphan provenance identifies jobs reclaimed after a crash without inventing a second lifecycle state.