Hi <@ULVA73B9P>, Using run_deployment Iam runn...
# ask-community
k
Hi @Marvin, Using run_deployment Iam running some flows, all flows use the same workool, I have created 3 queues for this workpool, and divided my flows into different queues, with high, medium and low with the priority set to 1,2 and 3 respectively for these work-queues. As shown in the code below, I am using the 'work_queue_name' parameter to distribute my flows into these work-queues. I see that the order of execution of my flows is not according to the priority of the queues. The documentation also says that the order of submission will be prioritised, not the order of execution. But I want the flows in 'high' priority queue to be executed first, and then medium, then low with all the flows schedules at the same time either with or without concurrency. How to achieve this?
m
You've encountered a common challenge with Prefect's work queue priority system. Here's a concise breakdown of how it works and what you can do: 1. Priority System: Prefect's priority system determines the order of flow run submissions, not the execution order. This means that flows from higher-priority queues are submitted for execution first, but actual execution depends on the availability of resources and concurrency settings. 2. Concurrency Limits: If all flows can execute simultaneously without hitting concurrency limits, the priority system won't affect execution order. However, if there are constraints, priority determines which queue's flows are executed first. 3. Ensuring Execution Order: To ensure that flows in the 'high' priority queue execute first, you might need to adjust concurrency settings or manage the timing of flow submissions to align with resource availability. For more details, you can refer to the Prefect documentation on work pools and priorities. If you have further questions or need a more specific solution, feel free to ask!