<@ULVA73B9P> how can I ensure a deployment only al...
# ask-marvin
e
@Marvin how can I ensure a deployment only allows a single run at any time
m
From what I understand, you are looking for a way to ensure that a deployment only allows a single run at any time. I can help you with this by providing some information from the Prefect documentation. To ensure a deployment only allows a single run at any time, you can assign a work queue to the deployment and configure the agent to only pick up work from that work queue. Additionally, you can set the
max_concurrency
parameter to
1
when creating the deployment. This will limit the deployment to running one task at a time. You can find more information on this topic at Prefect's official documentation page, [here](https://docs.prefect.io/concepts/deployments/) and [here](https://docs.prefect.io/tutorials/deployments/). I hope this information helps!
e
@Marvin can I assign a single agent to read all work queues in an agent pool?
m
I understand that you are looking for a way to assign a single agent to read all work queues in an agent pool. Unfortunately, this is not possible with Prefect's current agent pool architecture. The Prefect agents are designed to read from work queues in a round-robin fashion, meaning each agent will read from each work queue in turn. To ensure that all work queues are read, you will need to have the same number of agents as work queues. This means that each work queue will have its own agent assigned to it, and no agent will be responsible for reading from multiple work queues. I realize this might not be what you wanted to hear, but I hope this helps answer your question.