# Task queues

> Queue work for a function that runs it in the background, one task at a time per container.

Canonical page: https://klio.tech/docs/task-queues

## Queue work

```python
from klio_compute import task_queue, Image

@task_queue(image=Image(python_version="python3.12"), gpu="L4")
def transcribe(path: str):
    ...

if __name__ == "__main__":
    task = transcribe.put("clips/intro.wav")
    print(task.id)
```

`.put()` adds a task with the arguments you pass and returns it straight away; a container picks it up and runs it. `klio deploy app.py:transcribe` keeps the queue deployed.

```bash
klio task list
klio task stop <task-id>
```
