redis.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. _broker-redis:
  2. =============
  3. Using Redis
  4. =============
  5. .. _broker-redis-installation:
  6. Installation
  7. ============
  8. For the Redis support you have to install additional dependencies.
  9. You can install both Celery and these dependencies in one go using
  10. ehter the `celery-with-redis`_, or the `django-celery-with-redis` bundles::
  11. $ pip install -U celery-with-redis
  12. .. _`celery-with-redis`:
  13. http://pypi.python.org/pypi/celery-with-redis
  14. .. _`django-celery-with-redis`:
  15. http://pypi.python.org/pypi/django-celery-with-redis
  16. .. _broker-redis-configuration:
  17. Configuration
  18. =============
  19. Configuration is easy, just configure the location of
  20. your Redis database::
  21. BROKER_URL = "redis://localhost:6379/0"
  22. Where the URL is in the format of::
  23. redis://userid:password@hostname:port/db_number
  24. .. _redis-results-configuration:
  25. Results
  26. -------
  27. If you also want to store the state and return values of tasks in Redis,
  28. you should configure these settings::
  29. CELERY_RESULT_BACKEND = "redis://localhost:6379/0"
  30. For a complete list of options supported by the Redis result backend see
  31. :ref:`conf-redis-result-backend`