---
title: work_queue
sidebarTitle: work_queue
---

# `prefect.cli.work_queue`



Command line interface for working with work queues.


## Functions

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

```python
create(name: str = typer.Argument(..., help='The unique name to assign this work queue'), limit: int = typer.Option(None, '-l', '--limit', help='The concurrency limit to set on the queue.'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool to create the work queue in.'), priority: Optional[int] = typer.Option(None, '-q', '--priority', help='The associated priority for the created 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#L128" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
set_concurrency_limit(name: str = typer.Argument(..., help='The name or ID of the work queue'), limit: int = typer.Argument(..., help='The concurrency limit to set on the queue.'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'))
```


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#L172" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
clear_concurrency_limit(name: str = typer.Argument(..., help='The name or ID of the work queue to clear'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'))
```


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#L211" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
pause(name: str = typer.Argument(..., help='The name or ID of the work queue to pause'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'))
```


Pause a work queue.


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

```python
resume(name: str = typer.Argument(..., help='The name or ID of the work queue to resume'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'))
```


Resume a paused work queue.


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

```python
inspect(name: str = typer.Argument(None, help='The name or ID of the work queue to inspect'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'), output: Optional[str] = typer.Option(None, '--output', '-o', help='Specify an output format. Currently supports: json'))
```


Inspect a work queue by ID.


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

```python
ls(verbose: bool = typer.Option(False, '--verbose', '-v', help='Display more information.'), work_queue_prefix: str = typer.Option(None, '--match', '-m', help='Will match work queues with names that start with the specified prefix string'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool containing the work queues to list.'))
```


View all work queues.


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

```python
preview(name: str = typer.Argument(None, help='The name or ID of the work queue to preview'), hours: int = typer.Option(None, '-h', '--hours', help='The number of hours to look ahead; defaults to 1 hour'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool that the work queue belongs to.'))
```


Preview a work queue.


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

```python
delete(name: str = typer.Argument(..., help='The name or ID of the work queue to delete'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool containing 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#L595" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
read_wq_runs(name: str = typer.Argument(..., help='The name or ID of the work queue to poll'), pool: Optional[str] = typer.Option(None, '-p', '--pool', help='The name of the work pool containing the work queue to poll.'))
```


Get runs in a work queue. Note that this will trigger an artificial poll of
the work queue.

