mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #315] [FEATURE REQUEST] Provide the task ID to the task object when using the handler callback. #2158
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#2158
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 @pbarnum on GitHub (Aug 20, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/315
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I would like to get the ID of the task currently being processed in the handler's callback function.
Describe alternatives you've considered
Adding our own ID to the task object and getting it through the payload.
Additional context
I would like to reference the resource (task) generated for logging purposes. Currently, the
Taskinterface only exposesType() stringandPayload() []byte.@crossworth commented on GitHub (Aug 20, 2021):
Does
GetTaskIDsolves your problem?@pbarnum commented on GitHub (Aug 20, 2021):
Oh gosh yes it does! I don't know how I missed that. Thank you 👍