Slackbot
09/25/2025, 3:02 AMMarvin
09/25/2025, 3:02 AMMarvin
09/25/2025, 3:07 AM--concurrency-limit-collision-strategy
flag on prefect deploy
.
Example (adding CANCEL_NEW to your command):
uv run prefect deploy ./workflows/example_workflow.py:example_flow \
--name example-deployment \
--pool local-pool \
--cron "* * * * *" \
--concurrency-limit 1 \
--concurrency-limit-collision-strategy CANCEL_NEW
Notes:
- Valid strategies include at least CANCEL_NEW
(do not queue; cancel new runs when the limit is reached). If you omit this flag, Prefect will use its default behavior (typically queueing).
- You can also set this in prefect.yaml
if you prefer config over CLI:
deployments:
- name: example-deployment
entrypoint: ./workflows/example_workflow.py:example_flow
work_pool: local-pool
schedules:
- cron: "* * * * *"
concurrency_limit:
limit: 1
collision_strategy: CANCEL_NEW
References:
- Global concurrency limits (context on strategies)
- I verified the prefect deploy
interface exposes concurrency_limit
and concurrency_limit_collision_strategy
options. If you want, I can paste the full --help
output.