Repository navigation
feat(tasks): record a task failure with an explicit retry decision - #2161
Conversation
Adds SpecializedTask::record_failure_with_decision, which records a failed task attempt with a RetryDecision chosen by the worker, whatever the queue's retry policy says. A worker can use it to end a task without a retry, for example after a run that stopped at its time limit or that already committed its result. It can also use it to schedule a retry with its own backoff and resource demand. record_failure works as before and now delegates to it, so the retry loop that records a failure exists once. The HTTP API, the database and the audit log do not change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughWorkers can supply a retry decision when recording a task failure. The queue’s ChangesTask Retry Decisions
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to
|
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
Adds SpecializedTask::record_failure_with_decision, which records a failed task attempt with a RetryDecision chosen by the worker, whatever the queue's retry policy says. A worker can use it to end a task without a retry, for example after a run that stopped at its time limit or that already committed its result. It can also use it to schedule a retry with its own backoff and resource demand. record_failure works as before and now delegates to it, so the retry loop that records a failure exists once. The HTTP API, the database and the audit log do not change.
Summary by CodeRabbit