sqlalchemy.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .. _broker-sqlalchemy:
  2. ==================
  3. Using SQLAlchemy
  4. ==================
  5. .. _broker-sqlalchemy-installation:
  6. Installation
  7. ============
  8. .. _broker-sqlalchemy-configuration:
  9. Configuration
  10. =============
  11. This transport uses only the :setting:`BROKER_HOST` setting, which have to be
  12. an SQLAlchemy database URI.
  13. #. Set your broker transport::
  14. BROKER_TRANSPORT = "sqlalchemy"
  15. #. Configure the database URI::
  16. BROKER_HOST = "sqlite:///celerydb.sqlite"
  17. Please see `SQLAlchemy: Supported Databases`_ for a table of supported databases.
  18. Some other `SQLAlchemy Connection String`_, examples:
  19. .. code-block:: python
  20. # sqlite (filename)
  21. BROKER_HOST = "sqlite:///celerydb.sqlite"
  22. # mysql
  23. BROKER_HOST = "mysql://scott:tiger@localhost/foo"
  24. # postgresql
  25. BROKER_HOST = "postgresql://scott:tiger@localhost/mydatabase"
  26. # oracle
  27. BROKER_HOST = "oracle://scott:tiger@127.0.0.1:1521/sidname"
  28. .. _`SQLAlchemy: Supported Databases`:
  29. http://www.sqlalchemy.org/docs/core/engines.html#supported-databases
  30. .. _`SQLAlchemy Connection String`:
  31. http://www.sqlalchemy.org/docs/core/engines.html#database-urls
  32. .. _sqlalchemy-results-configuration:
  33. Results
  34. -------
  35. To store results in the database as well, you should configure the result
  36. backend. See :ref:`conf-database-result-backend`.
  37. .. _broker-sqlalchemy-limitations:
  38. Limitations
  39. ===========
  40. The SQLAlchemy database transport does not currently support:
  41. * Remote control commands (celeryev, broadcast)
  42. * Events, including the Django Admin monitor.
  43. * Using more than a few workers (can lead to messages being executed
  44. multiple times).