mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[GH-ISSUE #871] Order of task execution #2453
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#2453
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 @dikdom on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/871
Hello,
is there any guarantee of the task execution order depending on the enqueue order?
I know this sounds silly as this is a queue but unfortunately I have some contradicting experience. Shall I continue investigating my setup or there is no guarantee of the order of the task executions?
Thanks!
@kamikazechaser commented on GitHub (Apr 26, 2024):
Well there are ways to achieve something similar. Forcing lower concurrency, checking previous task status in task handlers. But there are no guarantees in any case.
@dikdom commented on GitHub (Apr 29, 2024):
That is sad, I mean this is meant to be a queue. In theory when there is only one process that executes the tasks, then the order of the executions should be the same order as they were inserted in the queue. Am I missing here something?
@Joker666 commented on GitHub (Oct 11, 2024):
@dikdom what you are looking for is called a workflow.
Asynqdoes not support that. Try River Pro, it supports workflows.@sanudatta11 commented on GitHub (Oct 25, 2024):
what you generally want is kind of like a state machine inside a queue handler
@kamikazechaser commented on GitHub (Oct 26, 2024):
https://github.com/yuyang0/dagflow
@PterX commented on GitHub (Jan 17, 2025):
I had a similar need, and I finally implemented it in a simple way. I created an asynq middleware to maintain a dependency relationship of task type. In the middle, it records whether all the dependent tasks have been executed. Otherwise, the dependent tasks will be requeued until they are depended on. All tasks have been completed