mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #869] [FEATURE REQUEST] Support for Fixed-Length Queues in Asynq #1443
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#1443
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 @FogDong on GitHub (Apr 23, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/869
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
In many applications, particularly those involving resource-constrained environments or systems where old tasks need to be automatically discarded, having the ability to maintain fixed-length queues is crucial. This feature would allow developers to set a maximum size on queues, ensuring that the queue does not exceed a certain number of tasks. This is particularly useful for maintaining the latest N tasks and automatically discarding older tasks when new ones arrive.
Describe the solution you'd like
I propose that Asynq supports an option to limit the size of task queues. When a queue reaches its maximum size, the system should automatically remove the oldest task(s) upon the addition of new tasks. This would ensure that the queue remains at a fixed length.
The implementation could involve:
Describe alternatives you've considered
Additional context
If this feature is accepted by the Asynq community, I would be very interested in contributing to its development. I believe this feature would not only benefit my use case but also be a valuable addition for many other users facing similar requirements.
@sanudatta11 commented on GitHub (Oct 25, 2024):
what happens to the old tasks in the queue, are u thinking of a DLQ approach where these tasks go to die or just removed completely with no trace?