mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #711] [Question] How to remove completed tasks automatically from redis? #2373
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#2373
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 @diptomondal007 on GitHub (Jul 30, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/711
It seems asynq tasks aren't being removed from redis which is making the redis memory full
I tried to get the TTL for a key and it's returning -1 which means it will never be expired. How to set TTL for a task?
@kamikazechaser commented on GitHub (Jul 31, 2023):
The GC is done internally. Set
asynq.Retentionwhen submitting tasks.@diptomondal007 commented on GitHub (Aug 12, 2023):
I have set asynq.Retention while enqueueing but the memory is still growing so the key number. Is that because of tasks being archived and not being deleted for 90 days? @kamikazechaser
@kamikazechaser commented on GitHub (Aug 14, 2023):
Archived tasks are different from completed tasks. The Retention option will successfully remove the completed ones.
Btw you can also use the inspector manually to delete tasks in various states manually in your own periodic go routiune.