django-celery-results-redis¶
A Celery result backend for Django that stores task, group and chord results in Redis, with the behaviour, models, manager API and admin of django-celery-results 2.6.0.
# settings.py
INSTALLED_APPS = [
...,
"django_celery_results_redis",
]
DJANGO_CELERY_RESULTS_REDIS = {
"DRIVER": "indexed",
"URL": "redis://localhost:6379/0",
}
CELERY_RESULT_BACKEND = "django-redis-db"
from django_celery_results_redis.models import TaskResult
TaskResult.objects.filter(status="FAILURE", date_done__gte=yesterday)
What it does¶
- Keeps the admin. The changelist, list filters, facet counts, search, date hierarchy, change form, delete and bulk actions and history are Django's own code running on a Redis-backed queryset. See parity.
- Keeps the models and managers.
TaskResult,GroupResultandChordCounterhave the same fields and methods as upstream, so most code only changes an import. See migration. - Keeps the backend behaviour.
result_extended,result_expires, groups, chords,task_track_startedand retries work as they do with the database backend. - Takes the database out of the write path. Workers talk to Redis only.
- Offers three storage drivers.
raw,indexedandredis_om, plus an optional RediSearch index for the admin search. See drivers.
Requirements¶
| Supported | |
|---|---|
| Python | 3.10, 3.11, 3.12, 3.13, 3.14 |
| Django | 5.2, 6.0, 6.1 |
| Celery | 5.5, 5.6 |
| Redis | 7.0 and later; Redis 8 or Redis Stack for the redis_om driver and the search index |
Where to go next¶
- Installation sets the package up in a project.
- Migrating from django-celery-results moves an existing one over, results included.
- Examples shows the code you are likely to write around it.
- Settings lists every option and system check.
- Performance gives the numbers per driver and the memory each one costs.