In summary, the
limit and
active_slots serve distinct roles within Prefecture's concurrency limits:
-
Limit specifies the maximum number of concurrent runs allowed under the limit. This is essentially the cap on concurrency to prevent more than a set number of tasks or flows from running simultaneously.
-
Active_slots indicates the current number of slots in use under the concurrency limit. This represents how many slots are currently occupied or active.
For more detailed information, you can refer to the
concurrency limit section in Prefect docs
Here's an example of setting a global concurrency limit:
bash
š” prefect gcl create my-limit --limit 5 --active-slots 3
This command sets a concurrency limit named
my-limit
with a maximum of 5 and initially 3 active slots.
For more usage examples, you can refer to the
GitHub issue PR.
If you'd like further clarification or have more questions, feel free to ask.