RichardKnop / machinery

Machinery is an asynchronous task queue/job queue based on distributed message passing.
Mozilla Public License 2.0
7.52k stars 914 forks source link

How to ensure that tasks of the same request can be prioritized for execution when initiating a batch of requests for a workflow with multiple tasks arranged in a chain, in order to avoid hunger. #810

Open HarvestWu opened 4 months ago

HarvestWu commented 4 months ago

How to ensure that tasks of the same request can be prioritized for execution when initiating a batch of requests for a workflow with multiple tasks arranged in a chain, in order to avoid hunger.

For example, a workflow contains two tasks, A and B, arranged in a chain structure, The concurrency of worker is set to 1. When 10 requests are made to this workflow, assuming that the first task to be executed is task A of request 1, how can we ensure that the next task to be executed is task B of request 1, rather than task A of other requests.