|
@@ -189,10 +189,18 @@ The backend used to store task results (tombstones).
|
|
|
Disabled by default.
|
|
|
Can be one of the following:
|
|
|
|
|
|
+* rpc
|
|
|
+ Send results back as AMQP messages
|
|
|
+ See :ref:`conf-rpc-result-backend`.
|
|
|
+
|
|
|
* database
|
|
|
Use a relational database supported by `SQLAlchemy`_.
|
|
|
See :ref:`conf-database-result-backend`.
|
|
|
|
|
|
+* redis
|
|
|
+ Use `Redis`_ to store the results.
|
|
|
+ See :ref:`conf-redis-result-backend`.
|
|
|
+
|
|
|
* cache
|
|
|
Use `memcached`_ to store the results.
|
|
|
See :ref:`conf-cache-result-backend`.
|
|
@@ -201,14 +209,6 @@ Can be one of the following:
|
|
|
Use `MongoDB`_ to store the results.
|
|
|
See :ref:`conf-mongodb-result-backend`.
|
|
|
|
|
|
-* redis
|
|
|
- Use `Redis`_ to store the results.
|
|
|
- See :ref:`conf-redis-result-backend`.
|
|
|
-
|
|
|
-* amqp
|
|
|
- Send results back as AMQP messages
|
|
|
- See :ref:`conf-amqp-result-backend`.
|
|
|
-
|
|
|
* cassandra
|
|
|
Use `Cassandra`_ to store the results.
|
|
|
See :ref:`conf-cassandra-result-backend`.
|
|
@@ -225,6 +225,10 @@ Can be one of the following:
|
|
|
Use `CouchDB`_ to store the results.
|
|
|
See :ref:`conf-couchdb-result-backend`.
|
|
|
|
|
|
+* amqp
|
|
|
+ Older AMQP backend (badly) emulating a database-based backend.
|
|
|
+ See :ref:`conf-amqp-result-backend`.
|
|
|
+
|
|
|
.. warning:
|
|
|
|
|
|
While the AMQP result backend is very efficient, you must make sure
|
|
@@ -341,35 +345,12 @@ you to customize the table names:
|
|
|
'group': 'myapp_groupmeta',
|
|
|
}
|
|
|
|
|
|
-.. _conf-amqp-result-backend:
|
|
|
-
|
|
|
-AMQP backend settings
|
|
|
----------------------
|
|
|
-
|
|
|
-.. note::
|
|
|
+.. _conf-rpc-result-backend:
|
|
|
|
|
|
- The AMQP backend requires RabbitMQ 1.1.0 or higher to automatically
|
|
|
- expire results. If you are running an older version of RabbitMQ
|
|
|
- you should disable result expiration like this:
|
|
|
-
|
|
|
- CELERY_TASK_RESULT_EXPIRES = None
|
|
|
-
|
|
|
-.. setting:: CELERY_RESULT_EXCHANGE
|
|
|
-
|
|
|
-CELERY_RESULT_EXCHANGE
|
|
|
-~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-
|
|
|
-Name of the exchange to publish results in. Default is `celeryresults`.
|
|
|
-
|
|
|
-.. setting:: CELERY_RESULT_EXCHANGE_TYPE
|
|
|
-
|
|
|
-CELERY_RESULT_EXCHANGE_TYPE
|
|
|
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
-
|
|
|
-The exchange type of the result exchange. Default is to use a `direct`
|
|
|
-exchange.
|
|
|
+RPC backend settings
|
|
|
+--------------------
|
|
|
|
|
|
-.. setting:: CELERY_RESULT_PERSISTENT
|
|
|
+.. _conf-amqp-result-backend:
|
|
|
|
|
|
CELERY_RESULT_PERSISTENT
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -383,8 +364,9 @@ Example configuration
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
- CELERY_RESULT_BACKEND = 'amqp'
|
|
|
- CELERY_TASK_RESULT_EXPIRES = 18000 # 5 hours.
|
|
|
+ CELERY_RESULT_BACKEND = 'rpc://'
|
|
|
+ CELERY_RESULT_PERSISTENT = False
|
|
|
+
|
|
|
|
|
|
.. _conf-cache-result-backend:
|
|
|
|
|
@@ -821,6 +803,56 @@ The URL is formed out of the following parts:
|
|
|
The default container the CouchDB server is writing to.
|
|
|
Defaults to ``default``.
|
|
|
|
|
|
+AMQP backend settings
|
|
|
+---------------------
|
|
|
+
|
|
|
+.. admonition:: Do not use in production.
|
|
|
+
|
|
|
+ This is the old AMQP result backend that creates one queue per task,
|
|
|
+ if you want to send results back as message please consider using the
|
|
|
+ RPC backend instead, or if you need the results to be persistent
|
|
|
+ use a result backend designed for that purpose (e.g. Redis, or a database).
|
|
|
+
|
|
|
+.. note::
|
|
|
+
|
|
|
+ The AMQP backend requires RabbitMQ 1.1.0 or higher to automatically
|
|
|
+ expire results. If you are running an older version of RabbitMQ
|
|
|
+ you should disable result expiration like this:
|
|
|
+
|
|
|
+ CELERY_TASK_RESULT_EXPIRES = None
|
|
|
+
|
|
|
+.. setting:: CELERY_RESULT_EXCHANGE
|
|
|
+
|
|
|
+CELERY_RESULT_EXCHANGE
|
|
|
+~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+
|
|
|
+Name of the exchange to publish results in. Default is `celeryresults`.
|
|
|
+
|
|
|
+.. setting:: CELERY_RESULT_EXCHANGE_TYPE
|
|
|
+
|
|
|
+CELERY_RESULT_EXCHANGE_TYPE
|
|
|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+
|
|
|
+The exchange type of the result exchange. Default is to use a `direct`
|
|
|
+exchange.
|
|
|
+
|
|
|
+.. setting:: CELERY_RESULT_PERSISTENT
|
|
|
+
|
|
|
+CELERY_RESULT_PERSISTENT
|
|
|
+~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
+
|
|
|
+If set to :const:`True`, result messages will be persistent. This means the
|
|
|
+messages will not be lost after a broker restart. The default is for the
|
|
|
+results to be transient.
|
|
|
+
|
|
|
+Example configuration
|
|
|
+~~~~~~~~~~~~~~~~~~~~~
|
|
|
+
|
|
|
+.. code-block:: python
|
|
|
+
|
|
|
+ CELERY_RESULT_BACKEND = 'amqp'
|
|
|
+ CELERY_TASK_RESULT_EXPIRES = 18000 # 5 hours.
|
|
|
+
|
|
|
|
|
|
.. _conf-messaging:
|
|
|
|