Back to Prefect

work_queue

docs/v3/api-ref/python/prefect-cli-work_queue.mdx

3.6.30.dev33.9 KB
Original Source

prefect.cli.work_queue

Work queue command — native cyclopts implementation.

Manage work queues.

Functions

create <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L68" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
create(name: Annotated[str, cyclopts.Parameter(help='The unique name to assign this work queue')])

Create a work queue.

set_concurrency_limit <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L137" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
set_concurrency_limit(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue')], limit: Annotated[int, cyclopts.Parameter(help='The concurrency limit to set on the queue.')])

Set a concurrency limit on a work queue.

clear_concurrency_limit <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L188" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
clear_concurrency_limit(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to clear')])

Clear any concurrency limits from a work queue.

pause <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L234" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
pause(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to pause')])

Pause a work queue.

resume <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L292" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
resume(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to resume')])

Resume a paused work queue.

inspect <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L337" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
inspect(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to inspect')])

Inspect a work queue by ID.

slots <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L410" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
slots(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue.')])

Show concurrency slot utilization for a work queue.

ls <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L504" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
ls()

View all work queues.

preview <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L645" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
preview(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to preview')])

Preview a work queue.

delete <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L762" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
delete(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to delete')])

Delete a work queue by ID.

read_wq_runs <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/work_queue.py#L811" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

python
read_wq_runs(name: Annotated[str, cyclopts.Parameter(help='The name or ID of the work queue to poll')])

Get runs in a work queue.

Note that this will trigger an artificial poll of the work queue.