configuration.rst 35 KB

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