When a worker picks up a new flow run, it prioritizes based on the defined priority of the work queue rather than the waiting time of the flow runs. Here’s the prioritization logic:
1.
Priority of Work Queues: Flow runs are submitted for execution based on the priority of their respective work queues, from the highest to the lowest priority.
2.
Concurrency Limits: If concurrency limits are not preventing execution, the priority still determines the order of submission without impacting execution.
3.
Critical Queues: Urgent work (such as unplanned backfills) in higher-priority queues will be executed before any work in lower priority queues.
For more details, you can refer to the
Prefect documentation on work pools.