You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid infinite retries for reject_on_worker_lost #9082
Enabling reject_on_worker_lost may cause infinite retry because it requeues the task to message broker, and it doesn't honor the max retries. This is extremely risky and may cause significant loss. Is there a way to somehow avoid infinite retries?
Hi, I'd like to work on this it's the same problem as discussion #8969 where @auvipy said
a draft PR would be welcome
#9720 fixed the missing request context in task_failure but tasks that hit a lost worker still get requeued with no limit.
My plan is option A from that discussion made opt-in: add a new setting (something like task_retry_on_worker_lost off by default). When it's on a lost worker goes through retry() instead of reject(requeue=True), so max_retries applies. When it's off, nothing changes.
Activity
abdullahmujahidali commentedon Oct 11, 2026
Hi, I'd like to work on this it's the same problem as discussion #8969 where @auvipy said
#9720 fixed the missing request context in
task_failurebut tasks that hit a lost worker still get requeued with no limit.My plan is option A from that discussion made opt-in: add a new setting (something like
task_retry_on_worker_lostoff by default). When it's on a lost worker goes throughretry()instead ofreject(requeue=True), somax_retriesapplies. When it's off, nothing changes.I'll open a draft PR for this.
feat(worker): add task_retry_on_worker_lost to limit requeues after w…