https://prefect.io logo
Title
m

max

11/15/2022, 10:32 AM
Hey! Does prefect have python method for this command
prefect work-queue set-concurrency-limit
?
1
p

Peyton Runyan

11/15/2022, 10:55 AM
Hey max! Our CLI commands can all be found under
src/prefect/cli/<base-command>
. So if you you want to see how a CLI command for work queues is called, go to
src/prefect/cli/work_queue.py
and then look for the function
set_concurrency_limit
In general our CLI commands just use the prefect client to call the API
m

max

11/15/2022, 10:55 AM
great, thank you!
p

Peyton Runyan

11/15/2022, 10:55 AM
Here's from inside of the CLI command
async with get_client() as client:
        try:
            await client.update_work_queue(
                id=queue_id,
                concurrency_limit=limit,
            )
🔥 1