mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #508] [BUG] Deleting a queue leaves behind processed counts #1249
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#1249
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 @tschaub on GitHub (Jul 6, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/508
Originally assigned to: @hibiken on GitHub.
Describe the bug
After deleting a queue, I expected Redis keys associated with that queue to be deleted. It looks like the processed counts are left behind, so when a new queue is created with the same name, it starts with the old processed counts.
To Reproduce
defaultqueueinspector.DeleteQueue("default", true)asynq:{default}:processedandasynq:{default}:processed:2022-07-06left behind.Expected behavior
After using the inspector to delete a queue, I expected that data associated with that queue would be removed. When I later created a new queue with the same name (
default), I expected the processed count (e.g. visible in the dashboard) to be zero. Instead, I found that the new queue started with the old count of processed tasks.Environment:
github.com/hibiken/asynq v0.23.0I'm not sure if this is a bug or user error. If there is another way to clean up after processing, I can help make that clearer in the documentation.
@tschaub commented on GitHub (Jul 6, 2022):
I'm guessing that something like
github.com/tschaub/asynq@88dedc2438could be the start of a fix. It looks like the existing test doesn't result in any processed tasks, so it doesn't really serve as a regression test.@hibiken commented on GitHub (Jul 9, 2022):
@tschaub Thank you for reporting this bug!
Please feel free to open a PR if you are willing to work on it (Please assign the issue to yourself, if you're working on it) If not, I can get to it in a couple of weeks.
@SaltySooda commented on GitHub (Jul 13, 2022):
for
asynq:{default}:processed, I add ProcessedTotalKey.but forasynq:{default}:processed:2022-07-06,I don't know how to get time param forProcessedKeyplease check #514
@arttor commented on GitHub (Dec 2, 2025):
Added a PR to fix queue cleanup #1088
@hibiken , @kamikazechaser can you please take a look?