mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #304] [FEATURE REQUEST] Adding a small amount of task information to asyncq.Task #126
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#126
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 @zhaolion on GitHub (Aug 3, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/304
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
My feature: I need to know the number of retries to update the database related information. Currently the processor cannot get information about the number of retries related to the task
Describe the solution you'd like
** Additional context
This is a very marginal feature, and I rarely encounter it. If it is too difficult to do it, you can consider close this issue or consider to implement this feature in the next major version.
@crossworth commented on GitHub (Aug 3, 2021):
Hello @zhaolion.
You can use
func GetRetryCount(ctx context.Context) (n int, ok bool)to get the retry count from the context.https://pkg.go.dev/github.com/hibiken/asynq?utm_source=godoc#GetRetryCount
@zhaolion commented on GitHub (Aug 3, 2021):
cool, thanks for your comment