> For the complete documentation index, see [llms.txt](https://taskflow-1.gitbook.io/taskflow-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taskflow-1.gitbook.io/taskflow-docs/architecture-decisions/0003-rq-over-celery.md).

# ADR-0003: RQ over Celery

Status: accepted.

## Context

The `worker` runs email digests, webhook delivery, and report generation. Redis is already in the stack for queues and board presence (see `../system-overview.md`), and the job volume is modest: bursts around digest time, a steady trickle of webhooks.

## Decision

Background jobs run on RQ over Redis. Retry policy is a workspace convention, implemented the same way for every job type: exponential backoff, dead-letter after 5 attempts (see `../incident-runbook.md`).

## Alternatives considered

* **Celery** — more routing and configuration surface than this workload needs, and a second operational model (broker, result backend, flower) for a three-job-type system.
* **Hand-rolled Redis lists** — retry, backoff, and dead-letter semantics would be reinvented per job type, which is how they drift apart.

## Consequences

* Scaling the worker means running more worker processes; there is no separate broker to operate.
* Job payloads stay small and ID-based (see `../architecture.md`), because RQ stores them in Redis.
* If job volume or routing needs outgrow RQ, this ADR is the document to supersede — the queue boundary is the one place that change would land.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://taskflow-1.gitbook.io/taskflow-docs/architecture-decisions/0003-rq-over-celery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
