mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #197] [FEATURE REQUEST] Filter or intercept the task on queue and do operations like Stop/Pause/Resume tasks #1079
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#1079
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 17, 2020).
Original GitHub issue: https://github.com/hibiken/asynq/issues/197
Originally assigned to: @hibiken on GitHub.
In Shared or Dedicated queue, it's good to have filter feature for tasks on queue. This feature will allow to do operations like Stop/Pause/Resume/Stats for the subset of tasks on queue.
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
@sujit-baniya commented on GitHub (Sep 17, 2020):
https://github.com/hibiken/asynq/issues/194
@hibiken commented on GitHub (Sep 17, 2020):
Maybe not exactly what you need, but you can implement your
Handlerto do a pre-check.If you are using
ServeMux, you can accomplish this by adding a middleware, which will be called for all tasks regardless of its type.Example:
@hibiken commented on GitHub (Feb 1, 2021):
Closing this issue. Seems stale.