mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #592] Question about task ID #287
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#287
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 @VolunPotest on GitHub (Dec 26, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/592
Hi!
I have a question about Task ID.
We can receive it when we create a task and send it to the Enqueue.
But I don't see the ID of the task in handling function, we only have *asynq.Task.
My question is: Is it possible to retrieve taskID in the handle function?
I think it will be really helpful (especially for a logging)
Thank you!
@hibiken commented on GitHub (Dec 27, 2022):
You can get it by calling
GetTaskIDpassing in the context.@VolunPotest commented on GitHub (Dec 29, 2022):
Hi. Thank you for the response.
Do you consider returning the whole metadata struct?
Something like this?