You can dynamically adjust task run concurrency limits in Prefect, but the process is not immediate and entails configuring task tags and worker pools.
1.
Task Tags Concurrency Limits:
- You can specify concurrency limits for tasks using tags. The limits apply to the maximum number of concurrent task runs in a
Running state for a given tag.
- Tags without explicit limits have unlimited concurrency.
- A concurrency limit of 0 for a tag will abort any task runs rather than delay them.
For a detailed guide, refer to Prefect's
tasks documentation.
2.
Worker Pools Concurrency Limits:
- When configuring a work pool through the Prefect CLI, you can set and clear concurrency limits using the
set-concurrency-limit
and
clear-concurrency-limit
subcommands.
- Work queues within pools also support concurrency limits, allowing for advanced control over execution priority and concurrency.
Additional information is available in the
work pools documentation.
It appears there are no directly related GitHub issues currently discussing dynamically adjusting these limits.