configuration.rst 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552
  1. .. _configuration:
  2. ============================
  3. Configuration and defaults
  4. ============================
  5. This document describes the configuration options available.
  6. If you're using the default loader, you must create the :file:`celeryconfig.py`
  7. module and make sure it is available on the Python path.
  8. .. contents::
  9. :local:
  10. :depth: 2
  11. .. _conf-example:
  12. Example configuration file
  13. ==========================
  14. This is an example configuration file to get you started.
  15. It should contain all you need to run a basic Celery set-up.
  16. .. code-block:: python
  17. # List of modules to import when celery starts.
  18. CELERY_IMPORTS = ("myapp.tasks", )
  19. ## Result store settings.
  20. CELERY_RESULT_BACKEND = "database"
  21. CELERY_RESULT_DBURI = "sqlite:///mydatabase.db"
  22. ## Broker settings.
  23. BROKER_URL = "amqp://guest:guest@localhost:5672//"
  24. ## Worker settings
  25. ## If you're doing mostly I/O you can have more processes,
  26. ## but if mostly spending CPU, try to keep it close to the
  27. ## number of CPUs on your machine. If not set, the number of CPUs/cores
  28. ## available will be used.
  29. CELERYD_CONCURRENCY = 10
  30. CELERY_ANNOTATIONS = {"tasks.add": {"rate_limit": "10/s"}}
  31. Configuration Directives
  32. ========================
  33. .. _conf-tasks:
  34. Task settings
  35. -------------
  36. .. setting:: CELERY_ANNOTATIONS
  37. CELERY_ANNOTATIONS
  38. ~~~~~~~~~~~~~~~~~~
  39. This setting can be used to rewrite any task attribute from the
  40. configuration. The setting can be a dict, or a list of annotation
  41. objects that filter for tasks and return a map of attributes
  42. to change.
  43. This will change the ``rate_limit`` attribute for the ``tasks.add``
  44. task:
  45. .. code-block:: python
  46. CELERY_ANNOTATIONS = {"tasks.add": {"rate_limit": "10/s"}}
  47. or change the same for all tasks:
  48. .. code-block:: python
  49. CELERY_ANNOTATIONS = {"*": {"rate_limit": "10/s"}}
  50. You can change methods too, for example the ``on_failure`` handler:
  51. .. code-block:: python
  52. def my_on_failure(self, exc, task_id, args, kwargs, einfo):
  53. print("Oh no! Task failed: %r" % (exc, ))
  54. CELERY_ANNOTATIONS = {"*": {"on_failure": my_on_failure}}
  55. If you need more flexibility then you can use objects
  56. instead of a dict to choose which tasks to annotate:
  57. .. code-block:: python
  58. class MyAnnotate(object):
  59. def annotate(self, task):
  60. if task.name.startswith("tasks."):
  61. return {"rate_limit": "10/s"}
  62. CELERY_ANNOTATIONS = (MyAnnotate(), {...})
  63. .. _conf-concurrency:
  64. Concurrency settings
  65. --------------------
  66. .. setting:: CELERYD_CONCURRENCY
  67. CELERYD_CONCURRENCY
  68. ~~~~~~~~~~~~~~~~~~~
  69. The number of concurrent worker processes/threads/green threads, executing
  70. tasks.
  71. Defaults to the number of available CPUs.
  72. .. setting:: CELERYD_PREFETCH_MULTIPLIER
  73. CELERYD_PREFETCH_MULTIPLIER
  74. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  75. How many messages to prefetch at a time multiplied by the number of
  76. concurrent processes. The default is 4 (four messages for each
  77. process). The default setting is usually a good choice, however -- if you
  78. have very long running tasks waiting in the queue and you have to start the
  79. workers, note that the first worker to start will receive four times the
  80. number of messages initially. Thus the tasks may not be fairly distributed
  81. to the workers.
  82. .. _conf-result-backend:
  83. Task result backend settings
  84. ----------------------------
  85. .. setting:: CELERY_RESULT_BACKEND
  86. CELERY_RESULT_BACKEND
  87. ~~~~~~~~~~~~~~~~~~~~~
  88. :Deprecated aliases: ``CELERY_BACKEND``
  89. The backend used to store task results (tombstones).
  90. Disabled by default.
  91. Can be one of the following:
  92. * database
  93. Use a relational database supported by `SQLAlchemy`_.
  94. See :ref:`conf-database-result-backend`.
  95. * cache
  96. Use `memcached`_ to store the results.
  97. See :ref:`conf-cache-result-backend`.
  98. * mongodb
  99. Use `MongoDB`_ to store the results.
  100. See :ref:`conf-mongodb-result-backend`.
  101. * redis
  102. Use `Redis`_ to store the results.
  103. See :ref:`conf-redis-result-backend`.
  104. * tyrant
  105. Use `Tokyo Tyrant`_ to store the results.
  106. See :ref:`conf-tyrant-result-backend`.
  107. * amqp
  108. Send results back as AMQP messages
  109. See :ref:`conf-amqp-result-backend`.
  110. .. warning:
  111. While the AMQP result backend is very efficient, you must make sure
  112. you only receive the same result once. See :doc:`userguide/executing`).
  113. .. _`SQLAlchemy`: http://sqlalchemy.org
  114. .. _`memcached`: http://memcached.org
  115. .. _`MongoDB`: http://mongodb.org
  116. .. _`Redis`: http://code.google.com/p/redis/
  117. .. _`Tokyo Tyrant`: http://1978th.net/tokyotyrant/
  118. .. setting:: CELERY_RESULT_SERIALIZER
  119. CELERY_RESULT_SERIALIZER
  120. ~~~~~~~~~~~~~~~~~~~~~~~~
  121. Result serialization format. Default is `"pickle"`. See
  122. :ref:`executing-serializers` for information about supported
  123. serialization formats.
  124. .. _conf-database-result-backend:
  125. Database backend settings
  126. -------------------------
  127. .. setting:: CELERY_RESULT_DBURI
  128. CELERY_RESULT_DBURI
  129. ~~~~~~~~~~~~~~~~~~~
  130. Please see `Supported Databases`_ for a table of supported databases.
  131. To use this backend you need to configure it with an
  132. `Connection String`_, some examples include:
  133. .. code-block:: python
  134. # sqlite (filename)
  135. CELERY_RESULT_DBURI = "sqlite:///celerydb.sqlite"
  136. # mysql
  137. CELERY_RESULT_DBURI = "mysql://scott:tiger@localhost/foo"
  138. # postgresql
  139. CELERY_RESULT_DBURI = "postgresql://scott:tiger@localhost/mydatabase"
  140. # oracle
  141. CELERY_RESULT_DBURI = "oracle://scott:tiger@127.0.0.1:1521/sidname"
  142. See `Connection String`_ for more information about connection
  143. strings.
  144. .. setting:: CELERY_RESULT_ENGINE_OPTIONS
  145. CELERY_RESULT_ENGINE_OPTIONS
  146. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147. To specify additional SQLAlchemy database engine options you can use
  148. the :setting:`CELERY_RESULT_ENGINE_OPTIONS` setting::
  149. # echo enables verbose logging from SQLAlchemy.
  150. CELERY_RESULT_ENGINE_OPTIONS = {"echo": True}
  151. .. setting:: CELERY_RESULT_DB_SHORT_LIVED_SESSIONS
  152. CELERY_RESULT_DB_SHORT_LIVED_SESSIONS = True
  153. Short lived sessions are disabled by default. If enabled they can drastically reduce
  154. performance, especially on systems processing lots of tasks. This option is useful
  155. on low-traffic workers that experience errors as a result of cached database connections
  156. going stale through inactivity. For example, intermittent errors like
  157. `(OperationalError) (2006, 'MySQL server has gone away')` can be fixed by enabling
  158. short lived sessions. This option only affects the database backend.
  159. .. _`Supported Databases`:
  160. http://www.sqlalchemy.org/docs/core/engines.html#supported-databases
  161. .. _`Connection String`:
  162. http://www.sqlalchemy.org/docs/core/engines.html#database-urls
  163. Example configuration
  164. ~~~~~~~~~~~~~~~~~~~~~
  165. .. code-block:: python
  166. CELERY_RESULT_BACKEND = "database"
  167. CELERY_RESULT_DBURI = "mysql://user:password@host/dbname"
  168. .. _conf-amqp-result-backend:
  169. AMQP backend settings
  170. ---------------------
  171. .. note::
  172. The AMQP backend requires RabbitMQ 1.1.0 or higher to automatically
  173. expire results. If you are running an older version of RabbitmQ
  174. you should disable result expiration like this:
  175. CELERY_TASK_RESULT_EXPIRES = None
  176. .. setting:: CELERY_RESULT_EXCHANGE
  177. CELERY_RESULT_EXCHANGE
  178. ~~~~~~~~~~~~~~~~~~~~~~
  179. Name of the exchange to publish results in. Default is `"celeryresults"`.
  180. .. setting:: CELERY_RESULT_EXCHANGE_TYPE
  181. CELERY_RESULT_EXCHANGE_TYPE
  182. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183. The exchange type of the result exchange. Default is to use a `direct`
  184. exchange.
  185. .. setting:: CELERY_RESULT_PERSISTENT
  186. CELERY_RESULT_PERSISTENT
  187. ~~~~~~~~~~~~~~~~~~~~~~~~
  188. If set to :const:`True`, result messages will be persistent. This means the
  189. messages will not be lost after a broker restart. The default is for the
  190. results to be transient.
  191. Example configuration
  192. ~~~~~~~~~~~~~~~~~~~~~
  193. .. code-block:: python
  194. CELERY_RESULT_BACKEND = "amqp"
  195. CELERY_TASK_RESULT_EXPIRES = 18000 # 5 hours.
  196. .. _conf-cache-result-backend:
  197. Cache backend settings
  198. ----------------------
  199. .. note::
  200. The cache backend supports the `pylibmc`_ and `python-memcached`
  201. libraries. The latter is used only if `pylibmc`_ is not installed.
  202. .. setting:: CELERY_CACHE_BACKEND
  203. CELERY_CACHE_BACKEND
  204. ~~~~~~~~~~~~~~~~~~~~
  205. Using a single memcached server:
  206. .. code-block:: python
  207. CELERY_CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
  208. Using multiple memcached servers:
  209. .. code-block:: python
  210. CELERY_RESULT_BACKEND = "cache"
  211. CELERY_CACHE_BACKEND = 'memcached://172.19.26.240:11211;172.19.26.242:11211/'
  212. .. setting:: CELERY_CACHE_BACKEND_OPTIONS
  213. The "dummy" backend stores the cache in memory only:
  214. CELERY_CACHE_BACKEND = "dummy"
  215. CELERY_CACHE_BACKEND_OPTIONS
  216. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  217. You can set pylibmc options using the :setting:`CELERY_CACHE_BACKEND_OPTIONS`
  218. setting:
  219. .. code-block:: python
  220. CELERY_CACHE_BACKEND_OPTIONS = {"binary": True,
  221. "behaviors": {"tcp_nodelay": True}}
  222. .. _`pylibmc`: http://sendapatch.se/projects/pylibmc/
  223. .. _conf-tyrant-result-backend:
  224. Tokyo Tyrant backend settings
  225. -----------------------------
  226. .. note::
  227. The Tokyo Tyrant backend requires the :mod:`pytyrant` library:
  228. http://pypi.python.org/pypi/pytyrant/
  229. This backend requires the following configuration directives to be set:
  230. .. setting:: TT_HOST
  231. TT_HOST
  232. ~~~~~~~
  233. Host name of the Tokyo Tyrant server.
  234. .. setting:: TT_PORT
  235. TT_PORT
  236. ~~~~~~~
  237. The port the Tokyo Tyrant server is listening to.
  238. Example configuration
  239. ~~~~~~~~~~~~~~~~~~~~~
  240. .. code-block:: python
  241. CELERY_RESULT_BACKEND = "tyrant"
  242. TT_HOST = "localhost"
  243. TT_PORT = 1978
  244. .. _conf-redis-result-backend:
  245. Redis backend settings
  246. ----------------------
  247. .. note::
  248. The Redis backend requires the :mod:`redis` library:
  249. http://pypi.python.org/pypi/redis/
  250. To install the redis package use `pip` or `easy_install`::
  251. $ pip install redis
  252. This backend requires the following configuration directives to be set.
  253. .. setting:: CELERY_REDIS_HOST
  254. CELERY_REDIS_HOST
  255. ~~~~~~~~~~~~~~~~~
  256. Host name of the Redis database server. e.g. `"localhost"`.
  257. .. setting:: CELERY_REDIS_PORT
  258. CELERY_REDIS_PORT
  259. ~~~~~~~~~~~~~~~~~
  260. Port to the Redis database server. e.g. `6379`.
  261. .. setting:: CELERY_REDIS_DB
  262. CELERY_REDIS_DB
  263. ~~~~~~~~~~~~~~~
  264. Database number to use. Default is 0
  265. .. setting:: CELERY_REDIS_PASSWORD
  266. CELERY_REDIS_PASSWORD
  267. ~~~~~~~~~~~~~~~~~~~~~
  268. Password used to connect to the database.
  269. .. setting:: CELERY_REDIS_MAX_CONNECTIONS
  270. CELERY_REDIS_MAX_CONNECTIONS
  271. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272. Maximum number of connections available in the Redis connection
  273. pool used for sending and retrieving results.
  274. Example configuration
  275. ~~~~~~~~~~~~~~~~~~~~~
  276. .. code-block:: python
  277. CELERY_RESULT_BACKEND = "redis"
  278. CELERY_REDIS_HOST = "localhost"
  279. CELERY_REDIS_PORT = 6379
  280. CELERY_REDIS_DB = 0
  281. .. _conf-mongodb-result-backend:
  282. MongoDB backend settings
  283. ------------------------
  284. .. note::
  285. The MongoDB backend requires the :mod:`pymongo` library:
  286. http://github.com/mongodb/mongo-python-driver/tree/master
  287. .. setting:: CELERY_MONGODB_BACKEND_SETTINGS
  288. CELERY_MONGODB_BACKEND_SETTINGS
  289. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  290. This is a dict supporting the following keys:
  291. * host
  292. Host name of the MongoDB server. Defaults to "localhost".
  293. * port
  294. The port the MongoDB server is listening to. Defaults to 27017.
  295. * user
  296. User name to authenticate to the MongoDB server as (optional).
  297. * password
  298. Password to authenticate to the MongoDB server (optional).
  299. * database
  300. The database name to connect to. Defaults to "celery".
  301. * taskmeta_collection
  302. The collection name to store task meta data.
  303. Defaults to "celery_taskmeta".
  304. .. _example-mongodb-result-config:
  305. Example configuration
  306. ~~~~~~~~~~~~~~~~~~~~~
  307. .. code-block:: python
  308. CELERY_RESULT_BACKEND = "mongodb"
  309. CELERY_MONGODB_BACKEND_SETTINGS = {
  310. "host": "192.168.1.100",
  311. "port": 30000,
  312. "database": "mydb",
  313. "taskmeta_collection": "my_taskmeta_collection",
  314. }
  315. .. _conf-messaging:
  316. Message Routing
  317. ---------------
  318. .. _conf-messaging-routing:
  319. .. setting:: CELERY_QUEUES
  320. CELERY_QUEUES
  321. ~~~~~~~~~~~~~
  322. The mapping of queues the worker consumes from. This is a dictionary
  323. of queue name/options. See :ref:`guide-routing` for more information.
  324. The default is a queue/exchange/binding key of `"celery"`, with
  325. exchange type `direct`.
  326. You don't have to care about this unless you want custom routing facilities.
  327. .. setting:: CELERY_ROUTES
  328. CELERY_ROUTES
  329. ~~~~~~~~~~~~~
  330. A list of routers, or a single router used to route tasks to queues.
  331. When deciding the final destination of a task the routers are consulted
  332. in order. See :ref:`routers` for more information.
  333. .. setting:: CELERY_CREATE_MISSING_QUEUES
  334. CELERY_CREATE_MISSING_QUEUES
  335. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  336. If enabled (default), any queues specified that is not defined in
  337. :setting:`CELERY_QUEUES` will be automatically created. See
  338. :ref:`routing-automatic`.
  339. .. setting:: CELERY_DEFAULT_QUEUE
  340. CELERY_DEFAULT_QUEUE
  341. ~~~~~~~~~~~~~~~~~~~~
  342. The queue used by default, if no custom queue is specified. This queue must
  343. be listed in :setting:`CELERY_QUEUES`. The default is: `celery`.
  344. .. seealso::
  345. :ref:`routing-changing-default-queue`
  346. .. setting:: CELERY_DEFAULT_EXCHANGE
  347. CELERY_DEFAULT_EXCHANGE
  348. ~~~~~~~~~~~~~~~~~~~~~~~
  349. Name of the default exchange to use when no custom exchange is
  350. specified. The default is: `celery`.
  351. .. setting:: CELERY_DEFAULT_EXCHANGE_TYPE
  352. CELERY_DEFAULT_EXCHANGE_TYPE
  353. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  354. Default exchange type used when no custom exchange is specified.
  355. The default is: `direct`.
  356. .. setting:: CELERY_DEFAULT_ROUTING_KEY
  357. CELERY_DEFAULT_ROUTING_KEY
  358. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  359. The default routing key used when sending tasks.
  360. The default is: `celery`.
  361. .. setting:: CELERY_DEFAULT_DELIVERY_MODE
  362. CELERY_DEFAULT_DELIVERY_MODE
  363. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  364. Can be `transient` or `persistent`. The default is to send
  365. persistent messages.
  366. .. _conf-broker-connection:
  367. Broker Settings
  368. ---------------
  369. .. setting:: BROKER_TRANSPORT
  370. BROKER_TRANSPORT
  371. ~~~~~~~~~~~~~~~~
  372. :Aliases: ``BROKER_BACKEND``
  373. :Deprecated aliases: ``CARROT_BACKEND``
  374. The Kombu transport to use. Default is ``amqplib``.
  375. You can use a custom transport class name, or select one of the
  376. built-in transports: ``amqplib``, ``pika``, ``redis``, ``beanstalk``,
  377. ``sqlalchemy``, ``django``, ``mongodb``, ``couchdb``.
  378. .. setting:: BROKER_URL
  379. BROKER_URL
  380. ~~~~~~~~~~
  381. Default broker URL. This must be an URL in the form of::
  382. transport://userid:password@hostname:port/virtual_host
  383. Only the scheme part (``transport://``) is required, the rest
  384. is optional, and defaults to the specific transports default values.
  385. If this setting is defined it will override a subset of the
  386. other ``BROKER`` options. These options are :setting:`BROKER_HOST`,
  387. :setting:`BROKER_USER`, :setting:`BROKER_PASSWORD`, :setting:`BROKER_PORT`,
  388. and :setting:`BROKER_VHOST`.
  389. See the Kombu documentation for more information about broker URLs.
  390. .. setting:: BROKER_HOST
  391. BROKER_HOST
  392. ~~~~~~~~~~~
  393. Hostname of the broker.
  394. .. setting:: BROKER_PORT
  395. BROKER_PORT
  396. ~~~~~~~~~~~
  397. Custom port of the broker. Default is to use the default port for the
  398. selected backend.
  399. .. setting:: BROKER_USER
  400. BROKER_USER
  401. ~~~~~~~~~~~
  402. Username to connect as.
  403. .. setting:: BROKER_PASSWORD
  404. BROKER_PASSWORD
  405. ~~~~~~~~~~~~~~~
  406. Password to connect with.
  407. .. setting:: BROKER_VHOST
  408. BROKER_VHOST
  409. ~~~~~~~~~~~~
  410. Virtual host. Default is `"/"`.
  411. .. setting:: BROKER_USE_SSL
  412. BROKER_USE_SSL
  413. ~~~~~~~~~~~~~~
  414. Use SSL to connect to the broker. Off by default. This may not be supported
  415. by all transports.
  416. .. setting:: BROKER_POOL_LIMIT
  417. BROKER_POOL_LIMIT
  418. ~~~~~~~~~~~~~~~~~
  419. .. versionadded:: 2.3
  420. The maximum number of connections that can be open in the connection pool.
  421. The pool is enabled by default since version 2.5, with a default limit of ten
  422. connections. This number can be tweaked depending on the number of
  423. threads/greenthreads (eventlet/gevent) using a connection. For example
  424. running eventlet with 1000 greenlets that use a connection to the broker,
  425. contention can arise and you should consider increasing the limit.
  426. If set to :const:`None` or 0 the connection pool will be disabled and
  427. connections will be established and closed for every use.
  428. Default (since 2.5) is to use a pool of 10 connections.
  429. .. setting:: BROKER_CONNECTION_TIMEOUT
  430. BROKER_CONNECTION_TIMEOUT
  431. ~~~~~~~~~~~~~~~~~~~~~~~~~
  432. The default timeout in seconds before we give up establishing a connection
  433. to the AMQP server. Default is 4 seconds.
  434. .. setting:: BROKER_CONNECTION_RETRY
  435. BROKER_CONNECTION_RETRY
  436. ~~~~~~~~~~~~~~~~~~~~~~~
  437. Automatically try to re-establish the connection to the AMQP broker if lost.
  438. The time between retries is increased for each retry, and is
  439. not exhausted before :setting:`BROKER_CONNECTION_MAX_RETRIES` is
  440. exceeded.
  441. This behavior is on by default.
  442. .. setting:: BROKER_CONNECTION_MAX_RETRIES
  443. BROKER_CONNECTION_MAX_RETRIES
  444. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  445. Maximum number of retries before we give up re-establishing a connection
  446. to the AMQP broker.
  447. If this is set to :const:`0` or :const:`None`, we will retry forever.
  448. Default is 100 retries.
  449. .. setting:: BROKER_TRANSPORT_OPTIONS
  450. BROKER_TRANSPORT_OPTIONS
  451. ~~~~~~~~~~~~~~~~~~~~~~~~
  452. .. versionadded:: 2.2
  453. A dict of additional options passed to the underlying transport.
  454. See your transport user manual for supported options (if any).
  455. .. _conf-task-execution:
  456. Task execution settings
  457. -----------------------
  458. .. setting:: CELERY_ALWAYS_EAGER
  459. CELERY_ALWAYS_EAGER
  460. ~~~~~~~~~~~~~~~~~~~
  461. If this is :const:`True`, all tasks will be executed locally by blocking until
  462. the task returns. ``apply_async()`` and ``Task.delay()`` will return
  463. an :class:`~celery.result.EagerResult` instance, which emulates the API
  464. and behavior of :class:`~celery.result.AsyncResult`, except the result
  465. is already evaluated.
  466. That is, tasks will be executed locally instead of being sent to
  467. the queue.
  468. .. setting:: CELERY_EAGER_PROPAGATES_EXCEPTIONS
  469. CELERY_EAGER_PROPAGATES_EXCEPTIONS
  470. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  471. If this is :const:`True`, eagerly executed tasks (applied by `task.apply()`,
  472. or when the :setting:`CELERY_ALWAYS_EAGER` setting is enabled), will
  473. propagate exceptions.
  474. It's the same as always running ``apply()`` with ``throw=True``.
  475. .. setting:: CELERY_IGNORE_RESULT
  476. CELERY_IGNORE_RESULT
  477. ~~~~~~~~~~~~~~~~~~~~
  478. Whether to store the task return values or not (tombstones).
  479. If you still want to store errors, just not successful return values,
  480. you can set :setting:`CELERY_STORE_ERRORS_EVEN_IF_IGNORED`.
  481. .. setting:: CELERY_MESSAGE_COMPRESSION
  482. CELERY_MESSAGE_COMPRESSION
  483. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  484. Default compression used for task messages.
  485. Can be ``"gzip"``, ``"bzip2"`` (if available), or any custom
  486. compression schemes registered in the Kombu compression registry.
  487. The default is to send uncompressed messages.
  488. .. setting:: CELERY_TASK_RESULT_EXPIRES
  489. CELERY_TASK_RESULT_EXPIRES
  490. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  491. Time (in seconds, or a :class:`~datetime.timedelta` object) for when after
  492. stored task tombstones will be deleted.
  493. A built-in periodic task will delete the results after this time
  494. (:class:`celery.task.backend_cleanup`).
  495. .. note::
  496. For the moment this only works with the amqp, database, cache, redis and MongoDB
  497. backends.
  498. When using the database or MongoDB backends, `celerybeat` must be
  499. running for the results to be expired.
  500. .. setting:: CELERY_MAX_CACHED_RESULTS
  501. CELERY_MAX_CACHED_RESULTS
  502. ~~~~~~~~~~~~~~~~~~~~~~~~~
  503. Result backends caches ready results used by the client.
  504. This is the total number of results to cache before older results are evicted.
  505. The default is 5000.
  506. .. setting:: CELERY_TRACK_STARTED
  507. CELERY_TRACK_STARTED
  508. ~~~~~~~~~~~~~~~~~~~~
  509. If :const:`True` the task will report its status as "started" when the
  510. task is executed by a worker. The default value is :const:`False` as
  511. the normal behaviour is to not report that level of granularity. Tasks
  512. are either pending, finished, or waiting to be retried. Having a "started"
  513. state can be useful for when there are long running tasks and there is a
  514. need to report which task is currently running.
  515. .. setting:: CELERY_TASK_SERIALIZER
  516. CELERY_TASK_SERIALIZER
  517. ~~~~~~~~~~~~~~~~~~~~~~
  518. A string identifying the default serialization method to use. Can be
  519. `pickle` (default), `json`, `yaml`, `msgpack` or any custom serialization
  520. methods that have been registered with :mod:`kombu.serialization.registry`.
  521. .. seealso::
  522. :ref:`executing-serializers`.
  523. .. setting:: CELERY_TASK_PUBLISH_RETRY
  524. CELERY_TASK_PUBLISH_RETRY
  525. ~~~~~~~~~~~~~~~~~~~~~~~~~
  526. .. versionadded:: 2.2
  527. Decides if publishing task messages will be retried in the case
  528. of connection loss or other connection errors.
  529. See also :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`.
  530. Disabled by default.
  531. .. setting:: CELERY_TASK_PUBLISH_RETRY_POLICY
  532. CELERY_TASK_PUBLISH_RETRY_POLICY
  533. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  534. .. versionadded:: 2.2
  535. Defines the default policy when retrying publishing a task message in
  536. the case of connection loss or other connection errors.
  537. This is a mapping that must contain the following keys:
  538. * `max_retries`
  539. Maximum number of retries before giving up, in this case the
  540. exception that caused the retry to fail will be raised.
  541. A value of 0 or :const:`None` means it will retry forever.
  542. The default is to retry 3 times.
  543. * `interval_start`
  544. Defines the number of seconds (float or integer) to wait between
  545. retries. Default is 0, which means the first retry will be
  546. instantaneous.
  547. * `interval_step`
  548. On each consecutive retry this number will be added to the retry
  549. delay (float or integer). Default is 0.2.
  550. * `interval_max`
  551. Maximum number of seconds (float or integer) to wait between
  552. retries. Default is 0.2.
  553. With the default policy of::
  554. {"max_retries": 3,
  555. "interval_start": 0,
  556. "interval_step": 0.2,
  557. "interval_max": 0.2}
  558. the maximum time spent retrying will be 0.4 seconds. It is set relatively
  559. short by default because a connection failure could lead to a retry pile effect
  560. if the broker connection is down: e.g. many web server processes waiting
  561. to retry blocking other incoming requests.
  562. .. setting:: CELERY_DEFAULT_RATE_LIMIT
  563. CELERY_DEFAULT_RATE_LIMIT
  564. ~~~~~~~~~~~~~~~~~~~~~~~~~
  565. The global default rate limit for tasks.
  566. This value is used for tasks that does not have a custom rate limit
  567. The default is no rate limit.
  568. .. setting:: CELERY_DISABLE_RATE_LIMITS
  569. CELERY_DISABLE_RATE_LIMITS
  570. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  571. Disable all rate limits, even if tasks has explicit rate limits set.
  572. .. setting:: CELERY_ACKS_LATE
  573. CELERY_ACKS_LATE
  574. ~~~~~~~~~~~~~~~~
  575. Late ack means the task messages will be acknowledged **after** the task
  576. has been executed, not *just before*, which is the default behavior.
  577. .. seealso::
  578. FAQ: :ref:`faq-acks_late-vs-retry`.
  579. .. _conf-celeryd:
  580. Worker: celeryd
  581. ---------------
  582. .. setting:: CELERY_IMPORTS
  583. CELERY_IMPORTS
  584. ~~~~~~~~~~~~~~
  585. A sequence of modules to import when the celery daemon starts.
  586. This is used to specify the task modules to import, but also
  587. to import signal handlers and additional remote control commands, etc.
  588. .. setting:: CELERYD_MAX_TASKS_PER_CHILD
  589. CELERYD_MAX_TASKS_PER_CHILD
  590. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  591. Maximum number of tasks a pool worker process can execute before
  592. it's replaced with a new one. Default is no limit.
  593. .. setting:: CELERYD_TASK_TIME_LIMIT
  594. CELERYD_TASK_TIME_LIMIT
  595. ~~~~~~~~~~~~~~~~~~~~~~~
  596. Task hard time limit in seconds. The worker processing the task will
  597. be killed and replaced with a new one when this is exceeded.
  598. .. setting:: CELERYD_TASK_SOFT_TIME_LIMIT
  599. CELERYD_TASK_SOFT_TIME_LIMIT
  600. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  601. Task soft time limit in seconds.
  602. The :exc:`~celery.exceptions.SoftTimeLimitExceeded` exception will be
  603. raised when this is exceeded. The task can catch this to
  604. e.g. clean up before the hard time limit comes.
  605. Example:
  606. .. code-block:: python
  607. from celery.task import task
  608. from celery.exceptions import SoftTimeLimitExceeded
  609. @task()
  610. def mytask():
  611. try:
  612. return do_work()
  613. except SoftTimeLimitExceeded:
  614. cleanup_in_a_hurry()
  615. .. setting:: CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  616. CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  617. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  618. If set, the worker stores all task errors in the result store even if
  619. :attr:`Task.ignore_result <celery.task.base.Task.ignore_result>` is on.
  620. .. setting:: CELERYD_STATE_DB
  621. CELERYD_STATE_DB
  622. ~~~~~~~~~~~~~~~~
  623. Name of the file used to stores persistent worker state (like revoked tasks).
  624. Can be a relative or absolute path, but be aware that the suffix `.db`
  625. may be appended to the file name (depending on Python version).
  626. Can also be set via the :option:`--statedb` argument to
  627. :mod:`~celery.bin.celeryd`.
  628. Not enabled by default.
  629. .. setting:: CELERYD_ETA_SCHEDULER_PRECISION
  630. CELERYD_ETA_SCHEDULER_PRECISION
  631. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  632. Set the maximum time in seconds that the ETA scheduler can sleep between
  633. rechecking the schedule. Default is 1 second.
  634. Setting this value to 1 second means the schedulers precision will
  635. be 1 second. If you need near millisecond precision you can set this to 0.1.
  636. .. _conf-error-mails:
  637. Error E-Mails
  638. -------------
  639. .. setting:: CELERY_SEND_TASK_ERROR_EMAILS
  640. CELERY_SEND_TASK_ERROR_EMAILS
  641. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  642. The default value for the `Task.send_error_emails` attribute, which if
  643. set to :const:`True` means errors occurring during task execution will be
  644. sent to :setting:`ADMINS` by email.
  645. .. setting:: ADMINS
  646. ADMINS
  647. ~~~~~~
  648. List of `(name, email_address)` tuples for the administrators that should
  649. receive error emails.
  650. .. setting:: SERVER_EMAIL
  651. SERVER_EMAIL
  652. ~~~~~~~~~~~~
  653. The email address this worker sends emails from.
  654. Default is celery@localhost.
  655. .. setting:: EMAIL_HOST
  656. EMAIL_HOST
  657. ~~~~~~~~~~
  658. The mail server to use. Default is `"localhost"`.
  659. .. setting:: EMAIL_HOST_USER
  660. EMAIL_HOST_USER
  661. ~~~~~~~~~~~~~~~
  662. User name (if required) to log on to the mail server with.
  663. .. setting:: EMAIL_HOST_PASSWORD
  664. EMAIL_HOST_PASSWORD
  665. ~~~~~~~~~~~~~~~~~~~
  666. Password (if required) to log on to the mail server with.
  667. .. setting:: EMAIL_PORT
  668. EMAIL_PORT
  669. ~~~~~~~~~~
  670. The port the mail server is listening on. Default is `25`.
  671. .. setting:: EMAIL_USE_SSL
  672. EMAIL_USE_SSL
  673. ~~~~~~~~~~~~~
  674. Use SSL when connecting to the SMTP server. Disabled by default.
  675. .. setting:: EMAIL_USE_TLS
  676. EMAIL_USE_TLS
  677. ~~~~~~~~~~~~~
  678. Use TLS when connecting to the SMTP server. Disabled by default.
  679. .. setting:: EMAIL_TIMEOUT
  680. EMAIL_TIMEOUT
  681. ~~~~~~~~~~~~~
  682. Timeout in seconds for when we give up trying to connect
  683. to the SMTP server when sending emails.
  684. The default is 2 seconds.
  685. .. _conf-example-error-mail-config:
  686. Example E-Mail configuration
  687. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  688. This configuration enables the sending of error emails to
  689. george@vandelay.com and kramer@vandelay.com:
  690. .. code-block:: python
  691. # Enables error emails.
  692. CELERY_SEND_TASK_ERROR_EMAILS = True
  693. # Name and email addresses of recipients
  694. ADMINS = (
  695. ("George Costanza", "george@vandelay.com"),
  696. ("Cosmo Kramer", "kosmo@vandelay.com"),
  697. )
  698. # Email address used as sender (From field).
  699. SERVER_EMAIL = "no-reply@vandelay.com"
  700. # Mailserver configuration
  701. EMAIL_HOST = "mail.vandelay.com"
  702. EMAIL_PORT = 25
  703. # EMAIL_HOST_USER = "servers"
  704. # EMAIL_HOST_PASSWORD = "s3cr3t"
  705. .. _conf-events:
  706. Events
  707. ------
  708. .. setting:: CELERY_SEND_EVENTS
  709. CELERY_SEND_EVENTS
  710. ~~~~~~~~~~~~~~~~~~
  711. Send events so the worker can be monitored by tools like `celerymon`.
  712. .. setting:: CELERY_SEND_TASK_SENT_EVENT
  713. CELERY_SEND_TASK_SENT_EVENT
  714. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  715. .. versionadded:: 2.2
  716. If enabled, a `task-sent` event will be sent for every task so tasks can be
  717. tracked before they are consumed by a worker.
  718. Disabled by default.
  719. .. setting:: CELERY_EVENT_SERIALIZER
  720. CELERY_EVENT_SERIALIZER
  721. ~~~~~~~~~~~~~~~~~~~~~~~
  722. Message serialization format used when sending event messages.
  723. Default is `"json"`. See :ref:`executing-serializers`.
  724. .. _conf-broadcast:
  725. Broadcast Commands
  726. ------------------
  727. .. setting:: CELERY_BROADCAST_QUEUE
  728. CELERY_BROADCAST_QUEUE
  729. ~~~~~~~~~~~~~~~~~~~~~~
  730. Name prefix for the queue used when listening for broadcast messages.
  731. The workers host name will be appended to the prefix to create the final
  732. queue name.
  733. Default is `"celeryctl"`.
  734. .. setting:: CELERY_BROADCAST_EXCHANGE
  735. CELERY_BROADCAST_EXCHANGE
  736. ~~~~~~~~~~~~~~~~~~~~~~~~~
  737. Name of the exchange used for broadcast messages.
  738. Default is `"celeryctl"`.
  739. .. setting:: CELERY_BROADCAST_EXCHANGE_TYPE
  740. CELERY_BROADCAST_EXCHANGE_TYPE
  741. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  742. Exchange type used for broadcast messages. Default is `"fanout"`.
  743. .. _conf-logging:
  744. Logging
  745. -------
  746. .. setting:: CELERYD_HIJACK_ROOT_LOGGER
  747. CELERYD_HIJACK_ROOT_LOGGER
  748. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  749. .. versionadded:: 2.2
  750. By default any previously configured logging options will be reset,
  751. because the Celery programs "hijacks" the root logger.
  752. If you want to customize your own logging then you can disable
  753. this behavior.
  754. .. note::
  755. Logging can also be customized by connecting to the
  756. :signal:`celery.signals.setup_logging` signal.
  757. .. setting:: CELERYD_LOG_COLOR
  758. CELERYD_LOG_COLOR
  759. ~~~~~~~~~~~~~~~~~
  760. Enables/disables colors in logging output by the Celery apps.
  761. By default colors are enabled if
  762. 1) the app is logging to a real terminal, and not a file.
  763. 2) the app is not running on Windows.
  764. .. setting:: CELERYD_LOG_FORMAT
  765. CELERYD_LOG_FORMAT
  766. ~~~~~~~~~~~~~~~~~~
  767. The format to use for log messages.
  768. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  769. See the Python :mod:`logging` module for more information about log
  770. formats.
  771. .. setting:: CELERYD_TASK_LOG_FORMAT
  772. CELERYD_TASK_LOG_FORMAT
  773. ~~~~~~~~~~~~~~~~~~~~~~~
  774. The format to use for log messages logged in tasks. Can be overridden using
  775. the :option:`--loglevel` option to :mod:`~celery.bin.celeryd`.
  776. Default is::
  777. [%(asctime)s: %(levelname)s/%(processName)s]
  778. [%(task_name)s(%(task_id)s)] %(message)s
  779. See the Python :mod:`logging` module for more information about log
  780. formats.
  781. .. setting:: CELERY_REDIRECT_STDOUTS
  782. CELERY_REDIRECT_STDOUTS
  783. ~~~~~~~~~~~~~~~~~~~~~~~
  784. If enabled `stdout` and `stderr` will be redirected
  785. to the current logger.
  786. Enabled by default.
  787. Used by :program:`celeryd` and :program:`celerybeat`.
  788. .. setting:: CELERY_REDIRECT_STDOUTS_LEVEL
  789. CELERY_REDIRECT_STDOUTS_LEVEL
  790. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  791. The log level output to `stdout` and `stderr` is logged as.
  792. Can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  793. :const:`ERROR` or :const:`CRITICAL`.
  794. Default is :const:`WARNING`.
  795. .. _conf-custom-components:
  796. Security
  797. --------
  798. .. setting:: CELERY_SECURITY_KEY
  799. CELERY_SECURITY_KEY
  800. ~~~~~~~~~~~~~~~~~~~
  801. .. versionadded:: 2.5
  802. The relative or absolute path to a file containing the private key
  803. used to sign messages when :ref:`message-signing` is used.
  804. .. setting:: CELERY_SECURITY_CERTIFICATE
  805. CELERY_SECURITY_CERTIFICATE
  806. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  807. .. versionadded:: 2.5
  808. The relative or absolute path to an X.509 certificate file
  809. used to sign messages when :ref:`message-signing` is used.
  810. .. setting:: CELERY_SECURITY_CERT_STORE
  811. CELERY_SECURITY_CERT_STORE
  812. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  813. .. versionadded:: 2.5
  814. The directory containing X.509 certificates used for
  815. :ref:`message signing`. Can be a glob with wildcards,
  816. (for example :file:`/etc/certs/*.pem`).
  817. Custom Component Classes (advanced)
  818. -----------------------------------
  819. .. setting:: CELERYD_POOL
  820. CELERYD_POOL
  821. ~~~~~~~~~~~~
  822. Name of the pool class used by the worker.
  823. You can use a custom pool class name, or select one of
  824. the built-in aliases: ``processes``, ``eventlet``, ``gevent``.
  825. Default is ``processes``.
  826. .. setting:: CELERYD_AUTOSCALER
  827. CELERYD_AUTOSCALER
  828. ~~~~~~~~~~~~~~~~~~
  829. .. versionadded:: 2.2
  830. Name of the autoscaler class to use.
  831. Default is ``"celery.worker.autoscale.Autoscaler"``.
  832. .. setting:: CELERYD_CONSUMER
  833. CELERYD_CONSUMER
  834. ~~~~~~~~~~~~~~~~
  835. Name of the consumer class used by the worker.
  836. Default is :class:`celery.worker.consumer.Consumer`
  837. .. setting:: CELERYD_MEDIATOR
  838. CELERYD_MEDIATOR
  839. ~~~~~~~~~~~~~~~~
  840. Name of the mediator class used by the worker.
  841. Default is :class:`celery.worker.controllers.Mediator`.
  842. .. setting:: CELERYD_ETA_SCHEDULER
  843. CELERYD_ETA_SCHEDULER
  844. ~~~~~~~~~~~~~~~~~~~~~
  845. Name of the ETA scheduler class used by the worker.
  846. Default is :class:`celery.utils.timer2.Timer`, or one overrided
  847. by the pool implementation.
  848. .. _conf-celerybeat:
  849. Periodic Task Server: celerybeat
  850. --------------------------------
  851. .. setting:: CELERYBEAT_SCHEDULE
  852. CELERYBEAT_SCHEDULE
  853. ~~~~~~~~~~~~~~~~~~~
  854. The periodic task schedule used by :mod:`~celery.bin.celerybeat`.
  855. See :ref:`beat-entries`.
  856. .. setting:: CELERYBEAT_SCHEDULER
  857. CELERYBEAT_SCHEDULER
  858. ~~~~~~~~~~~~~~~~~~~~
  859. The default scheduler class. Default is
  860. `"celery.beat.PersistentScheduler"`.
  861. Can also be set via the :option:`-S` argument to
  862. :mod:`~celery.bin.celerybeat`.
  863. .. setting:: CELERYBEAT_SCHEDULE_FILENAME
  864. CELERYBEAT_SCHEDULE_FILENAME
  865. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  866. Name of the file used by `PersistentScheduler` to store the last run times
  867. of periodic tasks. Can be a relative or absolute path, but be aware that the
  868. suffix `.db` may be appended to the file name (depending on Python version).
  869. Can also be set via the :option:`--schedule` argument to
  870. :mod:`~celery.bin.celerybeat`.
  871. .. setting:: CELERYBEAT_MAX_LOOP_INTERVAL
  872. CELERYBEAT_MAX_LOOP_INTERVAL
  873. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  874. The maximum number of seconds :mod:`~celery.bin.celerybeat` can sleep
  875. between checking the schedule. Default is 300 seconds (5 minutes).
  876. .. _conf-celerymon:
  877. Monitor Server: celerymon
  878. -------------------------
  879. .. setting:: CELERYMON_LOG_FORMAT
  880. CELERYMON_LOG_FORMAT
  881. ~~~~~~~~~~~~~~~~~~~~
  882. The format to use for log messages.
  883. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  884. See the Python :mod:`logging` module for more information about log
  885. formats.
  886. .. _conf-deprecated:
  887. Deprecated Settings
  888. -------------------
  889. These settings have been deprecated and should no longer used,
  890. as they will be removed in future versions.
  891. .. setting:: CELERY_AMQP_TASK_RESULT_EXPIRES
  892. CELERY_AMQP_TASK_RESULT_EXPIRES
  893. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  894. .. deprecated:: 2.5
  895. The time in seconds of which the task result queues should expire.
  896. This setting is deprecated, and will be removed in version 3.0.
  897. Please use :setting:`CELERY_TASK_RESULT_EXPIRES` instead.
  898. .. note::
  899. AMQP result expiration requires RabbitMQ versions 2.1.0 and higher.
  900. .. setting:: CELERY_TASK_ERROR_WHITELIST
  901. CELERY_TASK_ERROR_WHITELIST
  902. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  903. .. deprecated:: 2.5
  904. A white list of exceptions to send error emails for.
  905. This option is pending deprecation and is scheduled for removal
  906. in version 3.0.
  907. .. setting:: CELERYD_LOG_FILE
  908. CELERYD_LOG_FILE
  909. ~~~~~~~~~~~~~~~~
  910. .. deprecated:: 2.4
  911. This option is deprecated and is scheduled for removal in version 3.0.
  912. Please use the :option:`--logfile` argument instead.
  913. The default file name the worker daemon logs messages to. Can be overridden
  914. using the :option:`--logfile` option to :mod:`~celery.bin.celeryd`.
  915. The default is :const:`None` (`stderr`)
  916. .. setting:: CELERYD_LOG_LEVEL
  917. CELERYD_LOG_LEVEL
  918. ~~~~~~~~~~~~~~~~~
  919. .. deprecated:: 2.4
  920. This option is deprecated and is scheduled for removal in version 3.0.
  921. Please use the :option:`--loglevel` argument instead.
  922. Worker log level, can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  923. :const:`ERROR` or :const:`CRITICAL`.
  924. Can also be set via the :option:`--loglevel` argument to
  925. :mod:`~celery.bin.celeryd`.
  926. See the :mod:`logging` module for more information.
  927. .. setting:: CELERYBEAT_LOG_FILE
  928. CELERYBEAT_LOG_FILE
  929. ~~~~~~~~~~~~~~~~~~~
  930. .. deprecated:: 2.4
  931. This option is deprecated and is scheduled for removal in version 3.0.
  932. Please use the :option:`--logfile` argument instead.
  933. The default file name to log messages to. Can be overridden using
  934. the `--logfile` option to :mod:`~celery.bin.celerybeat`.
  935. The default is :const:`None` (`stderr`).
  936. .. setting:: CELERYBEAT_LOG_LEVEL
  937. CELERYBEAT_LOG_LEVEL
  938. ~~~~~~~~~~~~~~~~~~~~
  939. .. deprecated:: 2.4
  940. This option is deprecated and is scheduled for removal in version 3.0.
  941. Please use the :option:`--loglevel` argument instead.
  942. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  943. :const:`ERROR`, or :const:`CRITICAL`.
  944. Can also be set via the :option:`--loglevel` argument to
  945. :mod:`~celery.bin.celerybeat`.
  946. See the :mod:`logging` module for more information.
  947. .. setting:: CELERYMON_LOG_FILE
  948. CELERYMON_LOG_FILE
  949. ~~~~~~~~~~~~~~~~~~
  950. .. deprecated:: 2.4
  951. This option is deprecated and is scheduled for removal in version 3.0.
  952. Please use the :option:`--logfile` argument instead.
  953. The default file name to log messages to. Can be overridden using
  954. the :option:`--logfile` argument to `celerymon`.
  955. The default is :const:`None` (`stderr`)
  956. .. setting:: CELERYMON_LOG_LEVEL
  957. CELERYMON_LOG_LEVEL
  958. ~~~~~~~~~~~~~~~~~~~
  959. .. deprecated:: 2.4
  960. This option is deprecated and is scheduled for removal in version 3.0.
  961. Please use the :option:`--loglevel` argument instead.
  962. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  963. :const:`ERROR`, or :const:`CRITICAL`.
  964. See the :mod:`logging` module for more information.