Russell Brooks
05/06/2026, 9:38 AMMarvin
05/06/2026, 9:38 AMMarvin
05/06/2026, 9:39 AMtag:<your-tag>.
Example:
python
from prefect import get_client
async def main():
async with get_client() as client:
await client.upsert_global_concurrency_limit_by_name(
name="tag:my-tag",
limit=10,
slot_decay_per_second=1.5,
)
A few important notes:
- slot_decay_per_second is supported on global concurrency limits
- tag-based limits are represented as global limits named tag:<tag-name>
- the legacy method create_concurrency_limit(tag, concurrency_limit) does not expose slot_decay_per_second
If you want to update an existing one:
python
from prefect import get_client
from prefect.client.schemas.actions import GlobalConcurrencyLimitUpdate
async def main():
async with get_client() as client:
await client.update_global_concurrency_limit(
name="tag:my-tag",
concurrency_limit=GlobalConcurrencyLimitUpdate(
slot_decay_per_second=2.0
),
)
Conceptually:
- slot_decay_per_second = 0 -> standard concurrency limit
- slot_decay_per_second > 0 -> behaves like a rate limit, with slots decaying over time
Relevant docs:
- Global concurrency limits
- Tag-based concurrency limits
If you want, I can also show:
- the sync client version
- how to create this via the CLI
- how this interacts with @task(tags=[...]) usage