mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #327] [FEATURE REQUEST] callback for archived tasks #2166
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#2166
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlexeyBelezeko on GitHub (Sep 17, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/327
Originally assigned to: @hibiken on GitHub.
Right now asynq doesn't provide the functionality to notify go code about archived tasks. For example, I have a task for uploading images from one server to another. In case of failure, I want to retry this operation a few times and if the problem didn't fix I want to create a ticket or fire an alert.
I suggest adding some call back for archiving tasks to asynq server configuration.
@hibiken commented on GitHub (Sep 17, 2021):
@AlexeyBelezeko Thank you for opening this issue!
I think this is a common need and we do have a hook
ErrorHandlerwhich gets invoked every timeHandler.ProcessTaskreturns a non-nil error. We can use this hook to trigger alerts when task has reached its max-retry.Let me know if this works!
@AlexeyBelezeko commented on GitHub (Sep 17, 2021):
@hibiken thank you for a quick answer. This is exactly what I've been looking for. Sorry for my blindness I found out that the same snippet contains in the ErrorHandler comment section.
@hibiken commented on GitHub (Sep 17, 2021):
Glad I could help!
No worries. I appreciate these issues because it's a signal that I can do a better job in documentation.