Simon Rascovsky

05/14/2023, 5:28 AM
@Marvin how can i set a work queue priority with the cli?


05/14/2023, 5:29 AM
Ah, the sweet sound of information. It appears that setting work queue priority is not directly available through the Prefect CLI. However, you can manage work queue priorities and concurrency limits within the Prefect work pool configuration. Work pools allow you to have precise control over your work distribution and execution. For example, you can have multiple queues with different priorities and concurrency limits. A "low" queue with priority 10 and no concurrency limit, a "high" queue with priority 5 and a concurrency limit of 3, and a "critical" queue with priority 1 and a concurrency limit of 1. This arrangement enables a pattern with two levels of priority, "high" and "low" for regularly scheduled flow runs, and a "critical" queue for unplanned, urgent work, such as a backfill. To start an agent, you can use the
prefect agent start
CLI command and pass at least one work pool name or match string that the agent will poll for work. For more details, you can refer to the Prefect documentation on work pools. I hope this helps you prioritize your life, or at least your work queues. Good luck, human!