> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# cleanup_queue

# `prefect_redis.cleanup_queue`

## Classes

### `RedisWorkerCleanupQueueSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L74](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L74)</sup>

Settings for the Redis-backed worker cleanup queue.

### `WorkerCleanupQueue` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L144](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L144)</sup>

Redis-backed cleanup queue storage.

**Methods:**

#### `ack` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L311](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L311)</sup>

```python theme={null}
ack(self) -> CleanupQueueOperationResult
```

#### `enqueue` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L163](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L163)</sup>

```python theme={null}
enqueue(self) -> CleanupQueueMessage
```

#### `expire_leases` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L358](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L358)</sup>

```python theme={null}
expire_leases(self) -> CleanupQueueLeaseExpiryResult
```

#### `read_dead_letter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L421)</sup>

```python theme={null}
read_dead_letter(self) -> CleanupQueueDeadLetter | None
```

#### `read_message` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L409](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L409)</sup>

```python theme={null}
read_message(self) -> CleanupQueueMessage | None
```

#### `read_wakeup_sequence` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L446](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L446)</sup>

```python theme={null}
read_wakeup_sequence(self, work_pool_id: UUID) -> int
```

#### `release` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L325](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L325)</sup>

```python theme={null}
release(self) -> CleanupQueueOperationResult
```

#### `renew` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L344](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L344)</sup>

```python theme={null}
renew(self) -> CleanupQueueOperationResult
```

#### `reserve` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L243](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L243)</sup>

```python theme={null}
reserve(self) -> CleanupQueueReservation | None
```

#### `wait_for_wakeup` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L450](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L450)</sup>

```python theme={null}
wait_for_wakeup(self, work_pool_id: UUID) -> CleanupQueueWakeup | None
```

#### `wake_dispatchers` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect\_redis/cleanup\_queue.py#L433](https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-redis/prefect_redis/cleanup_queue.py#L433)</sup>

```python theme={null}
wake_dispatchers(self, work_pool_id: UUID) -> CleanupQueueWakeup
```
