Metadata-Version: 2.5
Name: django-celery-results-redis
Version: 0.1.0
Summary: Celery result backend for Django that stores results in Redis, with django-celery-results parity.
Project-URL: Documentation, https://ctolon.github.io/django-celery-results-redis/
Project-URL: Source, https://github.com/ctolon/django-celery-results-redis
Project-URL: Changelog, https://github.com/ctolon/django-celery-results-redis/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/ctolon/django-celery-results-redis/issues
Author-email: ctolon <cevatbatuhan.tolon@gmail.com>
Maintainer-email: ctolon <cevatbatuhan.tolon@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: admin,celery,django,redis,results
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Celery
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Framework :: Django :: 6.1
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.10
Requires-Dist: celery<6,>=5.5
Requires-Dist: django>=5.2
Requires-Dist: redis<8,>=5
Provides-Extra: redis-om
Requires-Dist: redis-om<2,>=1.1; extra == 'redis-om'
Description-Content-Type: text/markdown

# 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](https://github.com/celery/django-celery-results).

* Drop-in backend semantics: `result_extended`, `result_expires`, groups,
  chords, `task_track_started`, retries.
* Django admin identical to django-celery-results: list filters, facets,
  search, sorting, date hierarchy, change form, delete and bulk actions,
  history.
* Three storage drivers: `raw`, `indexed` (own secondary indexes) and
  `redis_om` (RediSearch), plus an optional RediSearch index for the admin
  search.
* Redis Sentinel supported through a `sentinel://` URL.
* Workers never touch the SQL database.

## Requirements

Python 3.10+, Django 5.2+, Celery 5.5+, Redis 7.0+ (Redis 8 or Redis Stack for
the `redis_om` driver).

## Installation

```console
$ pip install django-celery-results-redis
$ pip install "django-celery-results-redis[redis-om]"   # for the redis_om driver
```

```python
INSTALLED_APPS = [
    ...,
    "django_celery_results_redis",
]

DJANGO_CELERY_RESULTS_REDIS = {
    "DRIVER": "indexed",
    "URL": "redis://localhost:6379/0",
}

CELERY_RESULT_BACKEND = "django-redis-db"
CELERY_RESULT_EXTENDED = True
```

```console
$ python manage.py migrate django_celery_results_redis
```

The migration creates no table; it registers the models so that content types
and admin permissions exist.

Optional JSON status views:

```python
urlpatterns = [
    path("celery/", include("django_celery_results_redis.urls")),
]
```

## Migrating from django-celery-results

Both packages can be installed side by side. Point `CELERY_RESULT_BACKEND` at
`django-redis-db`, copy the rows you want to keep with
`manage.py celery_results_redis_import`, and restart the workers; see the
[migration guide](docs/migration.md).

## Documentation

Full documentation: <https://ctolon.github.io/django-celery-results-redis/>

* [Installation](https://ctolon.github.io/django-celery-results-redis/installation/)
* [Migrating from django-celery-results](https://ctolon.github.io/django-celery-results-redis/migration/)
* [Examples](https://ctolon.github.io/django-celery-results-redis/examples/)
* [Settings and system checks](https://ctolon.github.io/django-celery-results-redis/settings/)
* [Storage drivers](https://ctolon.github.io/django-celery-results-redis/drivers/)
* [Performance](https://ctolon.github.io/django-celery-results-redis/performance/)
* [Parity with django-celery-results](https://ctolon.github.io/django-celery-results-redis/admin-parity/)

## Contributing

```console
$ uv sync
$ docker compose up -d --wait
$ uv run pytest -n auto
```

See the [contributing guide](https://ctolon.github.io/django-celery-results-redis/contributing/).

## License

BSD 3-Clause, the same license as Django, Celery and django-celery-results.
Parts of the backend, models, managers and views are derived from
django-celery-results; the derived files and their copyright holders are listed
in [LICENSE](LICENSE).
