configuration.rst 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450
  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. Example configuration
  239. ~~~~~~~~~~~~~~~~~~~~~
  240. .. code-block:: python
  241. CELERY_RESULT_BACKEND = "redis"
  242. CELERY_REDIS_HOST = "localhost"
  243. CELERY_REDIS_PORT = 6379
  244. CELERY_REDIS_DB = 0
  245. .. _conf-mongodb-result-backend:
  246. MongoDB backend settings
  247. ------------------------
  248. .. note::
  249. The MongoDB backend requires the :mod:`pymongo` library:
  250. http://github.com/mongodb/mongo-python-driver/tree/master
  251. .. setting:: CELERY_MONGODB_BACKEND_SETTINGS
  252. CELERY_MONGODB_BACKEND_SETTINGS
  253. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  254. This is a dict supporting the following keys:
  255. * host
  256. Host name of the MongoDB server. Defaults to "localhost".
  257. * port
  258. The port the MongoDB server is listening to. Defaults to 27017.
  259. * user
  260. User name to authenticate to the MongoDB server as (optional).
  261. * password
  262. Password to authenticate to the MongoDB server (optional).
  263. * database
  264. The database name to connect to. Defaults to "celery".
  265. * taskmeta_collection
  266. The collection name to store task meta data.
  267. Defaults to "celery_taskmeta".
  268. .. _example-mongodb-result-config:
  269. Example configuration
  270. ~~~~~~~~~~~~~~~~~~~~~
  271. .. code-block:: python
  272. CELERY_RESULT_BACKEND = "mongodb"
  273. CELERY_MONGODB_BACKEND_SETTINGS = {
  274. "host": "192.168.1.100",
  275. "port": 30000,
  276. "database": "mydb",
  277. "taskmeta_collection": "my_taskmeta_collection",
  278. }
  279. .. _conf-messaging:
  280. Message Routing
  281. ---------------
  282. .. _conf-messaging-routing:
  283. .. setting:: CELERY_QUEUES
  284. CELERY_QUEUES
  285. ~~~~~~~~~~~~~
  286. The mapping of queues the worker consumes from. This is a dictionary
  287. of queue name/options. See :ref:`guide-routing` for more information.
  288. The default is a queue/exchange/binding key of `"celery"`, with
  289. exchange type `direct`.
  290. You don't have to care about this unless you want custom routing facilities.
  291. .. setting:: CELERY_ROUTES
  292. CELERY_ROUTES
  293. ~~~~~~~~~~~~~
  294. A list of routers, or a single router used to route tasks to queues.
  295. When deciding the final destination of a task the routers are consulted
  296. in order. See :ref:`routers` for more information.
  297. .. setting:: CELERY_CREATE_MISSING_QUEUES
  298. CELERY_CREATE_MISSING_QUEUES
  299. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  300. If enabled (default), any queues specified that is not defined in
  301. :setting:`CELERY_QUEUES` will be automatically created. See
  302. :ref:`routing-automatic`.
  303. .. setting:: CELERY_DEFAULT_QUEUE
  304. CELERY_DEFAULT_QUEUE
  305. ~~~~~~~~~~~~~~~~~~~~
  306. The queue used by default, if no custom queue is specified. This queue must
  307. be listed in :setting:`CELERY_QUEUES`. The default is: `celery`.
  308. .. seealso::
  309. :ref:`routing-changing-default-queue`
  310. .. setting:: CELERY_DEFAULT_EXCHANGE
  311. CELERY_DEFAULT_EXCHANGE
  312. ~~~~~~~~~~~~~~~~~~~~~~~
  313. Name of the default exchange to use when no custom exchange is
  314. specified. The default is: `celery`.
  315. .. setting:: CELERY_DEFAULT_EXCHANGE_TYPE
  316. CELERY_DEFAULT_EXCHANGE_TYPE
  317. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  318. Default exchange type used when no custom exchange is specified.
  319. The default is: `direct`.
  320. .. setting:: CELERY_DEFAULT_ROUTING_KEY
  321. CELERY_DEFAULT_ROUTING_KEY
  322. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  323. The default routing key used when sending tasks.
  324. The default is: `celery`.
  325. .. setting:: CELERY_DEFAULT_DELIVERY_MODE
  326. CELERY_DEFAULT_DELIVERY_MODE
  327. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  328. Can be `transient` or `persistent`. The default is to send
  329. persistent messages.
  330. .. _conf-broker-connection:
  331. Broker Settings
  332. ---------------
  333. .. setting:: BROKER_TRANSPORT
  334. BROKER_TRANSPORT
  335. ~~~~~~~~~~~~~~~~
  336. :Aliases: ``BROKER_BACKEND``
  337. :Deprecated aliases: ``CARROT_BACKEND``
  338. The Kombu transport to use. Default is ``amqplib``.
  339. You can use a custom transport class name, or select one of the
  340. built-in transports: ``amqplib``, ``pika``, ``redis``, ``beanstalk``,
  341. ``sqlalchemy``, ``django``, ``mongodb``, ``couchdb``.
  342. .. setting:: BROKER_URL
  343. BROKER_URL
  344. ~~~~~~~~~~
  345. Default broker URL. This must be an URL in the form of::
  346. transport://userid:password@hostname:port/virtual_host
  347. Only the scheme part (``transport://``) is required, the rest
  348. is optional, and defaults to the specific transports default values.
  349. If this setting is defined it will override a subset of the
  350. other ``BROKER`` options. These options are :setting:`BROKER_HOST`,
  351. :setting:`BROKER_USER`, :setting:`BROKER_PASSWORD`, :setting:`BROKER_PORT`,
  352. and :setting:`BROKER_VHOST`.
  353. See the Kombu documentation for more information about broker URLs.
  354. .. setting:: BROKER_HOST
  355. BROKER_HOST
  356. ~~~~~~~~~~~
  357. Hostname of the broker.
  358. .. setting:: BROKER_PORT
  359. BROKER_PORT
  360. ~~~~~~~~~~~
  361. Custom port of the broker. Default is to use the default port for the
  362. selected backend.
  363. .. setting:: BROKER_USER
  364. BROKER_USER
  365. ~~~~~~~~~~~
  366. Username to connect as.
  367. .. setting:: BROKER_PASSWORD
  368. BROKER_PASSWORD
  369. ~~~~~~~~~~~~~~~
  370. Password to connect with.
  371. .. setting:: BROKER_VHOST
  372. BROKER_VHOST
  373. ~~~~~~~~~~~~
  374. Virtual host. Default is `"/"`.
  375. .. setting:: BROKER_USE_SSL
  376. BROKER_USE_SSL
  377. ~~~~~~~~~~~~~~
  378. Use SSL to connect to the broker. Off by default. This may not be supported
  379. by all transports.
  380. .. setting:: BROKER_POOL_LIMIT
  381. BROKER_POOL_LIMIT
  382. ~~~~~~~~~~~~~~~~~
  383. .. versionadded:: 2.3
  384. The maximum number of connections that can be open in the connection pool.
  385. A good default value could be 10, or more if you're using eventlet/gevent
  386. or lots of threads.
  387. If set to :const:`None` or 0 the connection pool will be disabled and
  388. connections will be established and closed for every use.
  389. **Disabled by default.**
  390. .. setting:: BROKER_CONNECTION_TIMEOUT
  391. BROKER_CONNECTION_TIMEOUT
  392. ~~~~~~~~~~~~~~~~~~~~~~~~~
  393. The default timeout in seconds before we give up establishing a connection
  394. to the AMQP server. Default is 4 seconds.
  395. .. setting:: BROKER_CONNECTION_RETRY
  396. BROKER_CONNECTION_RETRY
  397. ~~~~~~~~~~~~~~~~~~~~~~~
  398. Automatically try to re-establish the connection to the AMQP broker if lost.
  399. The time between retries is increased for each retry, and is
  400. not exhausted before :setting:`BROKER_CONNECTION_MAX_RETRIES` is
  401. exceeded.
  402. This behavior is on by default.
  403. .. setting:: BROKER_CONNECTION_MAX_RETRIES
  404. BROKER_CONNECTION_MAX_RETRIES
  405. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  406. Maximum number of retries before we give up re-establishing a connection
  407. to the AMQP broker.
  408. If this is set to :const:`0` or :const:`None`, we will retry forever.
  409. Default is 100 retries.
  410. .. setting:: BROKER_TRANSPORT_OPTIONS
  411. BROKER_TRANSPORT_OPTIONS
  412. ~~~~~~~~~~~~~~~~~~~~~~~~
  413. .. versionadded:: 2.2
  414. A dict of additional options passed to the underlying transport.
  415. See your transport user manual for supported options (if any).
  416. .. _conf-task-execution:
  417. Task execution settings
  418. -----------------------
  419. .. setting:: CELERY_ALWAYS_EAGER
  420. CELERY_ALWAYS_EAGER
  421. ~~~~~~~~~~~~~~~~~~~
  422. If this is :const:`True`, all tasks will be executed locally by blocking until
  423. the task returns. ``apply_async()`` and ``Task.delay()`` will return
  424. an :class:`~celery.result.EagerResult` instance, which emulates the API
  425. and behavior of :class:`~celery.result.AsyncResult`, except the result
  426. is already evaluated.
  427. That is, tasks will be executed locally instead of being sent to
  428. the queue.
  429. .. setting:: CELERY_EAGER_PROPAGATES_EXCEPTIONS
  430. CELERY_EAGER_PROPAGATES_EXCEPTIONS
  431. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  432. If this is :const:`True`, eagerly executed tasks (applied by `task.apply()`,
  433. or when the :setting:`CELERY_ALWAYS_EAGER` setting is enabled), will
  434. propagate exceptions.
  435. It's the same as always running ``apply()`` with ``throw=True``.
  436. .. setting:: CELERY_IGNORE_RESULT
  437. CELERY_IGNORE_RESULT
  438. ~~~~~~~~~~~~~~~~~~~~
  439. Whether to store the task return values or not (tombstones).
  440. If you still want to store errors, just not successful return values,
  441. you can set :setting:`CELERY_STORE_ERRORS_EVEN_IF_IGNORED`.
  442. .. setting:: CELERY_MESSAGE_COMPRESSION
  443. CELERY_MESSAGE_COMPRESSION
  444. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  445. Default compression used for task messages.
  446. Can be ``"gzip"``, ``"bzip2"`` (if available), or any custom
  447. compression schemes registered in the Kombu compression registry.
  448. The default is to send uncompressed messages.
  449. .. setting:: CELERY_TASK_RESULT_EXPIRES
  450. CELERY_TASK_RESULT_EXPIRES
  451. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  452. Time (in seconds, or a :class:`~datetime.timedelta` object) for when after
  453. stored task tombstones will be deleted.
  454. A built-in periodic task will delete the results after this time
  455. (:class:`celery.task.backend_cleanup`).
  456. .. note::
  457. For the moment this only works with the amqp, database, cache, redis and MongoDB
  458. backends.
  459. When using the database or MongoDB backends, `celerybeat` must be
  460. running for the results to be expired.
  461. .. setting:: CELERY_MAX_CACHED_RESULTS
  462. CELERY_MAX_CACHED_RESULTS
  463. ~~~~~~~~~~~~~~~~~~~~~~~~~
  464. Result backends caches ready results used by the client.
  465. This is the total number of results to cache before older results are evicted.
  466. The default is 5000.
  467. .. setting:: CELERY_TRACK_STARTED
  468. CELERY_TRACK_STARTED
  469. ~~~~~~~~~~~~~~~~~~~~
  470. If :const:`True` the task will report its status as "started" when the
  471. task is executed by a worker. The default value is :const:`False` as
  472. the normal behaviour is to not report that level of granularity. Tasks
  473. are either pending, finished, or waiting to be retried. Having a "started"
  474. state can be useful for when there are long running tasks and there is a
  475. need to report which task is currently running.
  476. .. setting:: CELERY_TASK_SERIALIZER
  477. CELERY_TASK_SERIALIZER
  478. ~~~~~~~~~~~~~~~~~~~~~~
  479. A string identifying the default serialization method to use. Can be
  480. `pickle` (default), `json`, `yaml`, `msgpack` or any custom serialization
  481. methods that have been registered with :mod:`kombu.serialization.registry`.
  482. .. seealso::
  483. :ref:`executing-serializers`.
  484. .. setting:: CELERY_TASK_PUBLISH_RETRY
  485. CELERY_TASK_PUBLISH_RETRY
  486. ~~~~~~~~~~~~~~~~~~~~~~~~~
  487. .. versionadded:: 2.2
  488. Decides if publishing task messages will be retried in the case
  489. of connection loss or other connection errors.
  490. See also :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`.
  491. Disabled by default.
  492. .. setting:: CELERY_TASK_PUBLISH_RETRY_POLICY
  493. CELERY_TASK_PUBLISH_RETRY_POLICY
  494. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  495. .. versionadded:: 2.2
  496. Defines the default policy when retrying publishing a task message in
  497. the case of connection loss or other connection errors.
  498. This is a mapping that must contain the following keys:
  499. * `max_retries`
  500. Maximum number of retries before giving up, in this case the
  501. exception that caused the retry to fail will be raised.
  502. A value of 0 or :const:`None` means it will retry forever.
  503. The default is to retry 3 times.
  504. * `interval_start`
  505. Defines the number of seconds (float or integer) to wait between
  506. retries. Default is 0, which means the first retry will be
  507. instantaneous.
  508. * `interval_step`
  509. On each consecutive retry this number will be added to the retry
  510. delay (float or integer). Default is 0.2.
  511. * `interval_max`
  512. Maximum number of seconds (float or integer) to wait between
  513. retries. Default is 0.2.
  514. With the default policy of::
  515. {"max_retries": 3,
  516. "interval_start": 0,
  517. "interval_step": 0.2,
  518. "interval_max": 0.2}
  519. the maximum time spent retrying will be 0.4 seconds. It is set relatively
  520. short by default because a connection failure could lead to a retry pile effect
  521. if the broker connection is down: e.g. many web server processes waiting
  522. to retry blocking other incoming requests.
  523. .. setting:: CELERY_DEFAULT_RATE_LIMIT
  524. CELERY_DEFAULT_RATE_LIMIT
  525. ~~~~~~~~~~~~~~~~~~~~~~~~~
  526. The global default rate limit for tasks.
  527. This value is used for tasks that does not have a custom rate limit
  528. The default is no rate limit.
  529. .. setting:: CELERY_DISABLE_RATE_LIMITS
  530. CELERY_DISABLE_RATE_LIMITS
  531. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  532. Disable all rate limits, even if tasks has explicit rate limits set.
  533. .. setting:: CELERY_ACKS_LATE
  534. CELERY_ACKS_LATE
  535. ~~~~~~~~~~~~~~~~
  536. Late ack means the task messages will be acknowledged **after** the task
  537. has been executed, not *just before*, which is the default behavior.
  538. .. seealso::
  539. FAQ: :ref:`faq-acks_late-vs-retry`.
  540. .. _conf-celeryd:
  541. Worker: celeryd
  542. ---------------
  543. .. setting:: CELERY_IMPORTS
  544. CELERY_IMPORTS
  545. ~~~~~~~~~~~~~~
  546. A sequence of modules to import when the celery daemon starts.
  547. This is used to specify the task modules to import, but also
  548. to import signal handlers and additional remote control commands, etc.
  549. .. setting:: CELERYD_MAX_TASKS_PER_CHILD
  550. CELERYD_MAX_TASKS_PER_CHILD
  551. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  552. Maximum number of tasks a pool worker process can execute before
  553. it's replaced with a new one. Default is no limit.
  554. .. setting:: CELERYD_TASK_TIME_LIMIT
  555. CELERYD_TASK_TIME_LIMIT
  556. ~~~~~~~~~~~~~~~~~~~~~~~
  557. Task hard time limit in seconds. The worker processing the task will
  558. be killed and replaced with a new one when this is exceeded.
  559. .. setting:: CELERYD_TASK_SOFT_TIME_LIMIT
  560. CELERYD_TASK_SOFT_TIME_LIMIT
  561. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  562. Task soft time limit in seconds.
  563. The :exc:`~celery.exceptions.SoftTimeLimitExceeded` exception will be
  564. raised when this is exceeded. The task can catch this to
  565. e.g. clean up before the hard time limit comes.
  566. Example:
  567. .. code-block:: python
  568. from celery.task import task
  569. from celery.exceptions import SoftTimeLimitExceeded
  570. @task()
  571. def mytask():
  572. try:
  573. return do_work()
  574. except SoftTimeLimitExceeded:
  575. cleanup_in_a_hurry()
  576. .. setting:: CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  577. CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  578. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  579. If set, the worker stores all task errors in the result store even if
  580. :attr:`Task.ignore_result <celery.task.base.Task.ignore_result>` is on.
  581. .. setting:: CELERYD_STATE_DB
  582. CELERYD_STATE_DB
  583. ~~~~~~~~~~~~~~~~
  584. Name of the file used to stores persistent worker state (like revoked tasks).
  585. Can be a relative or absolute path, but be aware that the suffix `.db`
  586. may be appended to the file name (depending on Python version).
  587. Can also be set via the :option:`--statedb` argument to
  588. :mod:`~celery.bin.celeryd`.
  589. Not enabled by default.
  590. .. setting:: CELERYD_ETA_SCHEDULER_PRECISION
  591. CELERYD_ETA_SCHEDULER_PRECISION
  592. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  593. Set the maximum time in seconds that the ETA scheduler can sleep between
  594. rechecking the schedule. Default is 1 second.
  595. Setting this value to 1 second means the schedulers precision will
  596. be 1 second. If you need near millisecond precision you can set this to 0.1.
  597. .. _conf-error-mails:
  598. Error E-Mails
  599. -------------
  600. .. setting:: CELERY_SEND_TASK_ERROR_EMAILS
  601. CELERY_SEND_TASK_ERROR_EMAILS
  602. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  603. The default value for the `Task.send_error_emails` attribute, which if
  604. set to :const:`True` means errors occurring during task execution will be
  605. sent to :setting:`ADMINS` by email.
  606. .. setting:: ADMINS
  607. ADMINS
  608. ~~~~~~
  609. List of `(name, email_address)` tuples for the administrators that should
  610. receive error emails.
  611. .. setting:: SERVER_EMAIL
  612. SERVER_EMAIL
  613. ~~~~~~~~~~~~
  614. The email address this worker sends emails from.
  615. Default is celery@localhost.
  616. .. setting:: EMAIL_HOST
  617. EMAIL_HOST
  618. ~~~~~~~~~~
  619. The mail server to use. Default is `"localhost"`.
  620. .. setting:: EMAIL_HOST_USER
  621. EMAIL_HOST_USER
  622. ~~~~~~~~~~~~~~~
  623. User name (if required) to log on to the mail server with.
  624. .. setting:: EMAIL_HOST_PASSWORD
  625. EMAIL_HOST_PASSWORD
  626. ~~~~~~~~~~~~~~~~~~~
  627. Password (if required) to log on to the mail server with.
  628. .. setting:: EMAIL_PORT
  629. EMAIL_PORT
  630. ~~~~~~~~~~
  631. The port the mail server is listening on. Default is `25`.
  632. .. setting:: EMAIL_USE_SSL
  633. EMAIL_USE_SSL
  634. ~~~~~~~~~~~~~
  635. Use SSL when connecting to the SMTP server. Disabled by default.
  636. .. setting:: EMAIL_USE_TLS
  637. EMAIL_USE_TLS
  638. ~~~~~~~~~~~~~
  639. Use TLS when connecting to the SMTP server. Disabled by default.
  640. .. setting:: EMAIL_TIMEOUT
  641. EMAIL_TIMEOUT
  642. ~~~~~~~~~~~~~
  643. Timeout in seconds for when we give up trying to connect
  644. to the SMTP server when sending emails.
  645. The default is 2 seconds.
  646. .. _conf-example-error-mail-config:
  647. Example E-Mail configuration
  648. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  649. This configuration enables the sending of error emails to
  650. george@vandelay.com and kramer@vandelay.com:
  651. .. code-block:: python
  652. # Enables error emails.
  653. CELERY_SEND_TASK_ERROR_EMAILS = True
  654. # Name and email addresses of recipients
  655. ADMINS = (
  656. ("George Costanza", "george@vandelay.com"),
  657. ("Cosmo Kramer", "kosmo@vandelay.com"),
  658. )
  659. # Email address used as sender (From field).
  660. SERVER_EMAIL = "no-reply@vandelay.com"
  661. # Mailserver configuration
  662. EMAIL_HOST = "mail.vandelay.com"
  663. EMAIL_PORT = 25
  664. # EMAIL_HOST_USER = "servers"
  665. # EMAIL_HOST_PASSWORD = "s3cr3t"
  666. .. _conf-events:
  667. Events
  668. ------
  669. .. setting:: CELERY_SEND_EVENTS
  670. CELERY_SEND_EVENTS
  671. ~~~~~~~~~~~~~~~~~~
  672. Send events so the worker can be monitored by tools like `celerymon`.
  673. .. setting:: CELERY_SEND_TASK_SENT_EVENT
  674. CELERY_SEND_TASK_SENT_EVENT
  675. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  676. .. versionadded:: 2.2
  677. If enabled, a `task-sent` event will be sent for every task so tasks can be
  678. tracked before they are consumed by a worker.
  679. Disabled by default.
  680. .. setting:: CELERY_EVENT_SERIALIZER
  681. CELERY_EVENT_SERIALIZER
  682. ~~~~~~~~~~~~~~~~~~~~~~~
  683. Message serialization format used when sending event messages.
  684. Default is `"json"`. See :ref:`executing-serializers`.
  685. .. _conf-broadcast:
  686. Broadcast Commands
  687. ------------------
  688. .. setting:: CELERY_BROADCAST_QUEUE
  689. CELERY_BROADCAST_QUEUE
  690. ~~~~~~~~~~~~~~~~~~~~~~
  691. Name prefix for the queue used when listening for broadcast messages.
  692. The workers host name will be appended to the prefix to create the final
  693. queue name.
  694. Default is `"celeryctl"`.
  695. .. setting:: CELERY_BROADCAST_EXCHANGE
  696. CELERY_BROADCAST_EXCHANGE
  697. ~~~~~~~~~~~~~~~~~~~~~~~~~
  698. Name of the exchange used for broadcast messages.
  699. Default is `"celeryctl"`.
  700. .. setting:: CELERY_BROADCAST_EXCHANGE_TYPE
  701. CELERY_BROADCAST_EXCHANGE_TYPE
  702. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  703. Exchange type used for broadcast messages. Default is `"fanout"`.
  704. .. _conf-logging:
  705. Logging
  706. -------
  707. .. setting:: CELERYD_HIJACK_ROOT_LOGGER
  708. CELERYD_HIJACK_ROOT_LOGGER
  709. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  710. .. versionadded:: 2.2
  711. By default any previously configured logging options will be reset,
  712. because the Celery programs "hijacks" the root logger.
  713. If you want to customize your own logging then you can disable
  714. this behavior.
  715. .. note::
  716. Logging can also be customized by connecting to the
  717. :signal:`celery.signals.setup_logging` signal.
  718. .. setting:: CELERYD_LOG_COLOR
  719. CELERYD_LOG_COLOR
  720. ~~~~~~~~~~~~~~~~~
  721. Enables/disables colors in logging output by the Celery apps.
  722. By default colors are enabled if
  723. 1) the app is logging to a real terminal, and not a file.
  724. 2) the app is not running on Windows.
  725. .. setting:: CELERYD_LOG_FORMAT
  726. CELERYD_LOG_FORMAT
  727. ~~~~~~~~~~~~~~~~~~
  728. The format to use for log messages.
  729. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  730. See the Python :mod:`logging` module for more information about log
  731. formats.
  732. .. setting:: CELERYD_TASK_LOG_FORMAT
  733. CELERYD_TASK_LOG_FORMAT
  734. ~~~~~~~~~~~~~~~~~~~~~~~
  735. The format to use for log messages logged in tasks. Can be overridden using
  736. the :option:`--loglevel` option to :mod:`~celery.bin.celeryd`.
  737. Default is::
  738. [%(asctime)s: %(levelname)s/%(processName)s]
  739. [%(task_name)s(%(task_id)s)] %(message)s
  740. See the Python :mod:`logging` module for more information about log
  741. formats.
  742. .. setting:: CELERY_REDIRECT_STDOUTS
  743. CELERY_REDIRECT_STDOUTS
  744. ~~~~~~~~~~~~~~~~~~~~~~~
  745. If enabled `stdout` and `stderr` will be redirected
  746. to the current logger.
  747. Enabled by default.
  748. Used by :program:`celeryd` and :program:`celerybeat`.
  749. .. setting:: CELERY_REDIRECT_STDOUTS_LEVEL
  750. CELERY_REDIRECT_STDOUTS_LEVEL
  751. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  752. The log level output to `stdout` and `stderr` is logged as.
  753. Can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  754. :const:`ERROR` or :const:`CRITICAL`.
  755. Default is :const:`WARNING`.
  756. .. _conf-custom-components:
  757. Custom Component Classes (advanced)
  758. -----------------------------------
  759. .. setting:: CELERYD_POOL
  760. CELERYD_POOL
  761. ~~~~~~~~~~~~
  762. Name of the pool class used by the worker.
  763. You can use a custom pool class name, or select one of
  764. the built-in aliases: ``processes``, ``eventlet``, ``gevent``.
  765. Default is ``processes``.
  766. .. setting:: CELERYD_AUTOSCALER
  767. CELERYD_AUTOSCALER
  768. ~~~~~~~~~~~~~~~~~~
  769. .. versionadded:: 2.2
  770. Name of the autoscaler class to use.
  771. Default is ``"celery.worker.autoscale.Autoscaler"``.
  772. .. setting:: CELERYD_CONSUMER
  773. CELERYD_CONSUMER
  774. ~~~~~~~~~~~~~~~~
  775. Name of the consumer class used by the worker.
  776. Default is :class:`celery.worker.consumer.Consumer`
  777. .. setting:: CELERYD_MEDIATOR
  778. CELERYD_MEDIATOR
  779. ~~~~~~~~~~~~~~~~
  780. Name of the mediator class used by the worker.
  781. Default is :class:`celery.worker.controllers.Mediator`.
  782. .. setting:: CELERYD_ETA_SCHEDULER
  783. CELERYD_ETA_SCHEDULER
  784. ~~~~~~~~~~~~~~~~~~~~~
  785. Name of the ETA scheduler class used by the worker.
  786. Default is :class:`celery.utils.timer2.Timer`, or one overrided
  787. by the pool implementation.
  788. .. _conf-celerybeat:
  789. Periodic Task Server: celerybeat
  790. --------------------------------
  791. .. setting:: CELERYBEAT_SCHEDULE
  792. CELERYBEAT_SCHEDULE
  793. ~~~~~~~~~~~~~~~~~~~
  794. The periodic task schedule used by :mod:`~celery.bin.celerybeat`.
  795. See :ref:`beat-entries`.
  796. .. setting:: CELERYBEAT_SCHEDULER
  797. CELERYBEAT_SCHEDULER
  798. ~~~~~~~~~~~~~~~~~~~~
  799. The default scheduler class. Default is
  800. `"celery.beat.PersistentScheduler"`.
  801. Can also be set via the :option:`-S` argument to
  802. :mod:`~celery.bin.celerybeat`.
  803. .. setting:: CELERYBEAT_SCHEDULE_FILENAME
  804. CELERYBEAT_SCHEDULE_FILENAME
  805. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  806. Name of the file used by `PersistentScheduler` to store the last run times
  807. of periodic tasks. Can be a relative or absolute path, but be aware that the
  808. suffix `.db` may be appended to the file name (depending on Python version).
  809. Can also be set via the :option:`--schedule` argument to
  810. :mod:`~celery.bin.celerybeat`.
  811. .. setting:: CELERYBEAT_MAX_LOOP_INTERVAL
  812. CELERYBEAT_MAX_LOOP_INTERVAL
  813. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  814. The maximum number of seconds :mod:`~celery.bin.celerybeat` can sleep
  815. between checking the schedule. Default is 300 seconds (5 minutes).
  816. .. _conf-celerymon:
  817. Monitor Server: celerymon
  818. -------------------------
  819. .. setting:: CELERYMON_LOG_FORMAT
  820. CELERYMON_LOG_FORMAT
  821. ~~~~~~~~~~~~~~~~~~~~
  822. The format to use for log messages.
  823. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  824. See the Python :mod:`logging` module for more information about log
  825. formats.
  826. .. _conf-deprecated:
  827. Deprecated Settings
  828. -------------------
  829. These settings have been deprecated and should no longer used,
  830. as they will be removed in future versions.
  831. .. setting:: CELERY_AMQP_TASK_RESULT_EXPIRES
  832. CELERY_AMQP_TASK_RESULT_EXPIRES
  833. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  834. .. deprecated:: 2.5
  835. The time in seconds of which the task result queues should expire.
  836. This setting is deprecated, and will be removed in version 3.0.
  837. Please use :setting:`CELERY_TASK_RESULT_EXPIRES` instead.
  838. .. note::
  839. AMQP result expiration requires RabbitMQ versions 2.1.0 and higher.
  840. .. setting:: CELERY_TASK_ERROR_WHITELIST
  841. CELERY_TASK_ERROR_WHITELIST
  842. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  843. .. deprecated:: 2.5
  844. A white list of exceptions to send error emails for.
  845. This option is pending deprecation and is scheduled for removal
  846. in version 3.0.
  847. .. setting:: CELERYD_LOG_FILE
  848. CELERYD_LOG_FILE
  849. ~~~~~~~~~~~~~~~~
  850. .. deprecated:: 2.4
  851. This option is deprecated and is scheduled for removal in version 3.0.
  852. Please use the :option:`--logfile` argument instead.
  853. The default file name the worker daemon logs messages to. Can be overridden
  854. using the :option:`--logfile` option to :mod:`~celery.bin.celeryd`.
  855. The default is :const:`None` (`stderr`)
  856. .. setting:: CELERYD_LOG_LEVEL
  857. CELERYD_LOG_LEVEL
  858. ~~~~~~~~~~~~~~~~~
  859. .. deprecated:: 2.4
  860. This option is deprecated and is scheduled for removal in version 3.0.
  861. Please use the :option:`--loglevel` argument instead.
  862. Worker log level, can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  863. :const:`ERROR` or :const:`CRITICAL`.
  864. Can also be set via the :option:`--loglevel` argument to
  865. :mod:`~celery.bin.celeryd`.
  866. See the :mod:`logging` module for more information.
  867. .. setting:: CELERYBEAT_LOG_FILE
  868. CELERYBEAT_LOG_FILE
  869. ~~~~~~~~~~~~~~~~~~~
  870. .. deprecated:: 2.4
  871. This option is deprecated and is scheduled for removal in version 3.0.
  872. Please use the :option:`--logfile` argument instead.
  873. The default file name to log messages to. Can be overridden using
  874. the `--logfile` option to :mod:`~celery.bin.celerybeat`.
  875. The default is :const:`None` (`stderr`).
  876. .. setting:: CELERYBEAT_LOG_LEVEL
  877. CELERYBEAT_LOG_LEVEL
  878. ~~~~~~~~~~~~~~~~~~~~
  879. .. deprecated:: 2.4
  880. This option is deprecated and is scheduled for removal in version 3.0.
  881. Please use the :option:`--loglevel` argument instead.
  882. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  883. :const:`ERROR`, or :const:`CRITICAL`.
  884. Can also be set via the :option:`--loglevel` argument to
  885. :mod:`~celery.bin.celerybeat`.
  886. See the :mod:`logging` module for more information.
  887. .. setting:: CELERYMON_LOG_FILE
  888. CELERYMON_LOG_FILE
  889. ~~~~~~~~~~~~~~~~~~
  890. .. deprecated:: 2.4
  891. This option is deprecated and is scheduled for removal in version 3.0.
  892. Please use the :option:`--logfile` argument instead.
  893. The default file name to log messages to. Can be overridden using
  894. the :option:`--logfile` argument to `celerymon`.
  895. The default is :const:`None` (`stderr`)
  896. .. setting:: CELERYMON_LOG_LEVEL
  897. CELERYMON_LOG_LEVEL
  898. ~~~~~~~~~~~~~~~~~~~
  899. .. deprecated:: 2.4
  900. This option is deprecated and is scheduled for removal in version 3.0.
  901. Please use the :option:`--loglevel` argument instead.
  902. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  903. :const:`ERROR`, or :const:`CRITICAL`.
  904. See the :mod:`logging` module for more information.