Repository navigation
feat(task): allow acks_on_failure to be a callable deciding per exception - #10898
Open
abdullahmujahidali wants to merge 2 commits into
Open
abdullahmujahidali wants to merge 2 commits into
abdullahmujahidali wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10898 +/- ##
=======================================
Coverage 91.15% 91.15%
=======================================
Files 153 153
Lines 21777 21786 +9
Branches 2701 2702 +1
=======================================
+ Hits 19850 19859 +9
Misses 1619 1619
Partials 308 308
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
auvipy
reviewed
Nov 7, 2026
auvipy
left a comment
Member
There was a problem hiding this comment.
this is slated for next feature release. so priority for reviewing this is now right now.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #9342
With
acks_late, the decision to ack a failed task is made in the worker main process, butTask.on_failure()runs in the pool child. So changingacks_on_failurefromon_failure, as described in the issue, has no effect.This lets
acks_on_failurealso be a method that takes the exception and returns whether to acknowledge. It's called in the main process when the ack decision is made. PlainTrue/Falsework as before, and timeouts still useacks_on_timeout.Example from the issue, keeping meses on a transient error areexhausted:
One open question: if the method itlogged and the message isacknowledged (the current default). Would rejecting be better?