Failed task signature on error handler#615
Open
nicklaros wants to merge 1 commit intoRichardKnop:masterfrom
Open
Failed task signature on error handler#615nicklaros wants to merge 1 commit intoRichardKnop:masterfrom
nicklaros wants to merge 1 commit intoRichardKnop:masterfrom
Conversation
nicklaros
commented
Oct 28, 2020
Comment on lines
-81
to
-85
| if worker.errorHandler != nil { | ||
| worker.errorHandler(err) | ||
| } else { | ||
| log.WARNING.Printf("Broker failed with error: %s", err) | ||
| } |
Author
There was a problem hiding this comment.
The documentation about Error Handling (https://github.com/RichardKnop/machinery#error-handling) suggest that it is used for handling task related error, so I think for broker.StartConsuming error, better not use the same error handler, so here I just log it instead.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #615 +/- ##
==========================================
+ Coverage 37.24% 37.27% +0.03%
==========================================
Files 36 36
Lines 3112 3109 -3
==========================================
Hits 1159 1159
+ Misses 1805 1802 -3
Partials 148 148 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Current error handler only accept error as arguments, I propose to add failed task signature to make it more useful.
Some use case is when we need to broadcast error event about failed task to notify other system.