mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 23:45:52 +03:00
[GH-ISSUE #435] Can I get metadata from server context? #2218
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#2218
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 @realmicro on GitHub (Apr 15, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/435
When I Use
client.EnqueueContext, the context with my metadata,In Server, Can I get client metadata from
ProcessTask's context?@hibiken commented on GitHub (Apr 15, 2022):
@realmicro thank you for the question!
The context you provide to
EnqueueContextapplies to the enqueue operation only (e.g. timeout/deadline for enqueue operation). If you need to provide metadata to Handler, use task payload instead.If you have some static metadata you want to provide to handler via context, you may be able to leverage
Config.BaseContext@realmicro commented on GitHub (Apr 16, 2022):
@hibiken OK, Thanks for your reply.
I have use task payload instead.