<@ULVA73B9P> provide me an example of setting the ...
# ask-marvin
r
@Marvin provide me an example of setting the concurrency_limit and collision_strategy for a deployment in prefect.yam
m
To set the
concurrency_limit
and
collision_strategy
for a deployment in a
prefect.yaml
file in Prefect 3.x, you'll need to define these attributes within your deployment configuration. Here's a concise example:
Copy code
yaml
# prefect.yaml

deployments:
  - name: my-deployment
    flow_name: my-flow
    work_pool:
      concurrency_limit: 10
      collision_strategy: "cancel"
### Key Points: - Concurrency Limit: This sets the maximum number of concurrent runs for this deployment. In the example, it's set to 10. - Collision Strategy: This determines what happens when a new run is scheduled while the concurrency limit is already reached. The
"cancel"
strategy will cancel the new run if a collision occurs. You can find more detailed information about configuring deployments in the Prefect documentation. If you need further customization or information, you might want to explore the Prefect CLI or API as well.