mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #233] [FEATURE REQUEST] Pass default queue name when initializing client #87
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#87
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 @mingrammer on GitHub (Jan 27, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/233
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
No, but it is for convenience. Passing the queue name when enqueue tasks every time is too cumbersome. So I'd like to suggest a feature described below.
Describe the solution you'd like
It would be good to pass the default queue name when initializing the
asynq.Clientlikeasynq.Serverinitialization. (IfClientOptionis added, the currentOptionshould be renamed toServerOptionI think)And if we pass the queue name when enqueue, the default queue name should be overridden.
@mingrammer commented on GitHub (Jan 27, 2021):
If you agree with it, I can work for it.
@hibiken commented on GitHub (Jan 27, 2021):
@mingrammer Thank you for opening this issue!
Actually, we have
SetDefaultOptionsmethod onClient. Would this work for your use case?Example:
@mingrammer commented on GitHub (Jan 28, 2021):
@hibiken Oh, I didn't check that method. Thank you for letting me know it.
But
SetDefaultOptionsseems to apply to each task. How do you think about a feature that supports global default options for all tasks for a client?@hibiken commented on GitHub (Jan 30, 2021):
Hmm I can see the use case for providing a method to set the global defaults. But I'm hesitant to add yet another method to set defaults.
I'll keep this issue open for now to see if other people want this feature, too.
If this feature request gets a lot of upvotes, I think it validates that this is a common need.
@hibiken commented on GitHub (Feb 1, 2021):
Closing this issue for now. I'll revisit if I get similar feature requests.