mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #194] [FEATURE REQUEST] Implement some feature if not already exists #2086
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#2086
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 @sujit-baniya on GitHub (Sep 15, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/194
Originally assigned to: @hibiken on GitHub.
Thanks for this great library.
I was wondering if following features already exists in this library:
Basically I'm trying to implement this library for in one of my project where I could manage tasks, queues and workers pool.
@hibiken commented on GitHub (Sep 15, 2020):
@itsursujit Thanks for opening this issue! These are all very interesting features.
We have
PauseQueueandUnpauseQueuemethods onInspector. Also, the CLI has thepauseandunpausecommands.Not sure if this is what you need. What do you mean by "Filter or intercept the task"?
We don't support "move" operation (move a task from one queue to another). This is mainly due to how we deal with multiple keys in Redis cluster. However, you can simulate move operation by first deleting a task and enqueueing the same to another queue. You can delete a task by calling
DeleteTaskByKeyor delete command in the CLI.Queues are created dynamically. If you enqueue a task with a queue name that doesn't already exist, the queue will be created for that task.
Example:
For the consumer side, we currently don't support dynamic queue configuration. The list of queues to monitor is specified at the initialization time with
Config.I think we can add a feature to support more dynamic queue configuration. Do you have suggestions?
No, we currently don't have this. But I think this is definitely feasible and we can add this feature.
I'm not quite sure what you mean by this. Would you mind explaining more?
@sujit-baniya commented on GitHub (Sep 16, 2020):
Sure,
By filter or Intercept the task, I mean before/after the task is put on the queue and consumer has still not consumed the task, I could filter the list of tasks by payload and do operations like Delay such task, Stop them or pause or resume them.
Use-Case:
Users are sending tasks to a dynamically created queue. As an admin, I could filter and group the list of tasks by any field in the payload and view the stats of tasks on queue. This would help me control the tasks per user or payload
Use-Case:
Users are sending to a queue with 1 worker. They start to send in high volume. As an Admin, I could attach more workers on different servers or same server for that queue. This will help users with high volume of task
Since we're using redis for queue. As an Admin, I would add ip addresses of servers where I've deployed the application. The applications are running without workers initiation. By default, queue worker is running on ServerA. I would add entry for queue worker on redis for ServerB. This entry will be picked by application on ServerB and create workers for that queue on ServerB.
@sujit-baniya commented on GitHub (Sep 16, 2020):
Also another important use-case could be Shared Vs Dedicated Queue/Workers:
Shared Queue Workers:
ROUND-ROBIN strategy - Whichever queue is free, send to that queue irrespective of queue priorities,
WEIGHTED strategy - Send to queue with appropriate queue based on messages. High volume messages would go with high priority queue,
CUSTOM strategy - Admin defines the strategy for user. If userA is set to high priority, his messages will go to high priority queue
Probably making use of
mux.Handle("queue", handler)Dedicate Queue Workers:
Probably making use of
mux.HandleFunc("queue:12", handler)@hibiken commented on GitHub (Sep 16, 2020):
It's difficult to discuss multiple features in one thread 😞 Would you mind opening an issue per feature request?
That way I can tackle each issue one at a time 👍
@sujit-baniya commented on GitHub (Sep 17, 2020):
Sure
@hibiken commented on GitHub (Sep 20, 2020):
Tracking this issue with #195, #196 and #197 instead.