[GH-ISSUE #886] [FEATURE REQUEST] Unique option for run time of task #2461

Open
opened 2026-03-15 20:34:27 +03:00 by kerem · 0 comments
Owner

Originally created by @agorman on GitHub (May 25, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/886

Originally assigned to: @hibiken on GitHub.

Is your feature request related to a problem? Please describe.
I'm running periodic tasks and I'd like the tasks to be unique until they are done running (reach completed or archived state). Currently the two options for uniqueness are hard to work with for this case. Choosing a time.Duration is difficult because the tasks may have vastly different run times. Making the task unique based on id is also difficult because I'd like to retain completed tasks for a given time for other reasons and if the task goes into archived state I'd have to manually remove it before the task runs again.

Describe the solution you'd like
I'd like a unique option that can be tied to the state of a task. Uniqueness would stop being checked if the task was in the archived or completed states.

Originally created by @agorman on GitHub (May 25, 2024). Original GitHub issue: https://github.com/hibiken/asynq/issues/886 Originally assigned to: @hibiken on GitHub. **Is your feature request related to a problem? Please describe.** I'm running periodic tasks and I'd like the tasks to be unique until they are done running (reach completed or archived state). Currently the two options for uniqueness are hard to work with for this case. Choosing a time.Duration is difficult because the tasks may have vastly different run times. Making the task unique based on id is also difficult because I'd like to retain completed tasks for a given time for other reasons and if the task goes into archived state I'd have to manually remove it before the task runs again. **Describe the solution you'd like** I'd like a unique option that can be tied to the state of a task. Uniqueness would stop being checked if the task was in the archived or completed states.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2461
No description provided.