mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 15:35:55 +03:00
[GH-ISSUE #422] [FEATURE REQUEST] Possibility to configure retry strategy per task using Option API #186
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#186
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 @ajatprabha on GitHub (Mar 19, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/422
Originally assigned to: @hibiken on GitHub.
Is it currently possible to configure a task's retry mechanism from Option API? I see that we can specify MaxRetry, but can we also specify RetryBackoff strategy?
Describe the solution you'd like
Describe alternatives you've considered
I'm not sure how I can use
RetryDelayFuncfor this since it is passed on during initialisation and can't possibly have all the information with it beforehand.@hibiken commented on GitHub (Mar 19, 2022):
@ajatprabha Thanks for opening an issue!
You could include that metadata in your payload and provide a custom
RetryDelayFuncto use that metadata, and fallback to useDefaultRetryDelayFuncif that metadata is not present. Does that work for you?@ajatprabha commented on GitHub (Mar 19, 2022):
Ok, I'll try this out and get back if I face any issues with it.
@hibiken commented on GitHub (Mar 22, 2022):
Closing this!