mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #629] [FEATURE REQUEST] Add ability to remove unique tasks on error #1324
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#1324
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 @lexuzieel on GitHub (Mar 19, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/629
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
In my project I run scheduled tasks with drastically varying execution times, so I schedule them to run every minute and tried to use unique option in order to have "no-overlap" logic.
However, since currently unique lock is only released on successful completion, in case my task ends with an error I have a dangling
unique task indefinitely (in order to achieve no overlapping I set unique TTL to a large amount - like an hour).
Describe the solution you'd like
I would like to have an option to tell that unique lock should be released on task error.
Describe alternatives you've considered
Currently the only option I see is to manually remove the task using
Inspectorat the end of processor handler.Additional context
Coming from Laravel, it has a concept of "without overlapping" job scheduling: https://laravel.com/docs/10.x/queues#preventing-job-overlaps
@kamikazechaser commented on GitHub (Mar 23, 2023):
Better to use a distributed lock mechanism like https://github.com/bsm/redislock then defer release the lock in the task handler.