mongodb.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .. _broker-mongodb:
  2. ===============
  3. Using MongoDB
  4. ===============
  5. .. admonition:: Experimental Status
  6. The MongoDB transport is in need of improvements in many areas and there
  7. are several open bugs. Unfortunately we don't have the resources or funds
  8. required to improve the situation, so we're looking for contributors
  9. and partners willing to help.
  10. .. _broker-mongodb-installation:
  11. Installation
  12. ============
  13. For the MongoDB support you have to install additional dependencies.
  14. You can install both Celery and these dependencies in one go using
  15. the ``celery[mongodb]`` :ref:`bundle <bundles>`:
  16. .. code-block:: bash
  17. $ pip install -U celery[mongodb]
  18. .. _broker-mongodb-configuration:
  19. Configuration
  20. =============
  21. Configuration is easy, set the transport, and configure the location of
  22. your MongoDB database::
  23. BROKER_URL = 'mongodb://localhost:27017/database_name'
  24. Where the URL is in the format of::
  25. mongodb://userid:password@hostname:port/database_name
  26. The host name will default to ``localhost`` and the port to 27017,
  27. and so they are optional. userid and password are also optional,
  28. but needed if your MongoDB server requires authentication.
  29. .. _mongodb-results-configuration:
  30. Results
  31. -------
  32. If you also want to store the state and return values of tasks in MongoDB,
  33. you should see :ref:`conf-mongodb-result-backend`.