configuration.rst 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492
  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. A good default value could be 10, or more if you're using eventlet/gevent
  391. or lots of threads.
  392. If set to :const:`None` or 0 the connection pool will be disabled and
  393. connections will be established and closed for every use.
  394. **Disabled by default.**
  395. .. setting:: BROKER_CONNECTION_TIMEOUT
  396. BROKER_CONNECTION_TIMEOUT
  397. ~~~~~~~~~~~~~~~~~~~~~~~~~
  398. The default timeout in seconds before we give up establishing a connection
  399. to the AMQP server. Default is 4 seconds.
  400. .. setting:: BROKER_CONNECTION_RETRY
  401. BROKER_CONNECTION_RETRY
  402. ~~~~~~~~~~~~~~~~~~~~~~~
  403. Automatically try to re-establish the connection to the AMQP broker if lost.
  404. The time between retries is increased for each retry, and is
  405. not exhausted before :setting:`BROKER_CONNECTION_MAX_RETRIES` is
  406. exceeded.
  407. This behavior is on by default.
  408. .. setting:: BROKER_CONNECTION_MAX_RETRIES
  409. BROKER_CONNECTION_MAX_RETRIES
  410. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  411. Maximum number of retries before we give up re-establishing a connection
  412. to the AMQP broker.
  413. If this is set to :const:`0` or :const:`None`, we will retry forever.
  414. Default is 100 retries.
  415. .. setting:: BROKER_TRANSPORT_OPTIONS
  416. BROKER_TRANSPORT_OPTIONS
  417. ~~~~~~~~~~~~~~~~~~~~~~~~
  418. .. versionadded:: 2.2
  419. A dict of additional options passed to the underlying transport.
  420. See your transport user manual for supported options (if any).
  421. .. _conf-task-execution:
  422. Task execution settings
  423. -----------------------
  424. .. setting:: CELERY_ALWAYS_EAGER
  425. CELERY_ALWAYS_EAGER
  426. ~~~~~~~~~~~~~~~~~~~
  427. If this is :const:`True`, all tasks will be executed locally by blocking until
  428. the task returns. ``apply_async()`` and ``Task.delay()`` will return
  429. an :class:`~celery.result.EagerResult` instance, which emulates the API
  430. and behavior of :class:`~celery.result.AsyncResult`, except the result
  431. is already evaluated.
  432. That is, tasks will be executed locally instead of being sent to
  433. the queue.
  434. .. setting:: CELERY_EAGER_PROPAGATES_EXCEPTIONS
  435. CELERY_EAGER_PROPAGATES_EXCEPTIONS
  436. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  437. If this is :const:`True`, eagerly executed tasks (applied by `task.apply()`,
  438. or when the :setting:`CELERY_ALWAYS_EAGER` setting is enabled), will
  439. propagate exceptions.
  440. It's the same as always running ``apply()`` with ``throw=True``.
  441. .. setting:: CELERY_IGNORE_RESULT
  442. CELERY_IGNORE_RESULT
  443. ~~~~~~~~~~~~~~~~~~~~
  444. Whether to store the task return values or not (tombstones).
  445. If you still want to store errors, just not successful return values,
  446. you can set :setting:`CELERY_STORE_ERRORS_EVEN_IF_IGNORED`.
  447. .. setting:: CELERY_MESSAGE_COMPRESSION
  448. CELERY_MESSAGE_COMPRESSION
  449. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  450. Default compression used for task messages.
  451. Can be ``"gzip"``, ``"bzip2"`` (if available), or any custom
  452. compression schemes registered in the Kombu compression registry.
  453. The default is to send uncompressed messages.
  454. .. setting:: CELERY_TASK_RESULT_EXPIRES
  455. CELERY_TASK_RESULT_EXPIRES
  456. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  457. Time (in seconds, or a :class:`~datetime.timedelta` object) for when after
  458. stored task tombstones will be deleted.
  459. A built-in periodic task will delete the results after this time
  460. (:class:`celery.task.backend_cleanup`).
  461. .. note::
  462. For the moment this only works with the amqp, database, cache, redis and MongoDB
  463. backends.
  464. When using the database or MongoDB backends, `celerybeat` must be
  465. running for the results to be expired.
  466. .. setting:: CELERY_MAX_CACHED_RESULTS
  467. CELERY_MAX_CACHED_RESULTS
  468. ~~~~~~~~~~~~~~~~~~~~~~~~~
  469. Result backends caches ready results used by the client.
  470. This is the total number of results to cache before older results are evicted.
  471. The default is 5000.
  472. .. setting:: CELERY_TRACK_STARTED
  473. CELERY_TRACK_STARTED
  474. ~~~~~~~~~~~~~~~~~~~~
  475. If :const:`True` the task will report its status as "started" when the
  476. task is executed by a worker. The default value is :const:`False` as
  477. the normal behaviour is to not report that level of granularity. Tasks
  478. are either pending, finished, or waiting to be retried. Having a "started"
  479. state can be useful for when there are long running tasks and there is a
  480. need to report which task is currently running.
  481. .. setting:: CELERY_TASK_SERIALIZER
  482. CELERY_TASK_SERIALIZER
  483. ~~~~~~~~~~~~~~~~~~~~~~
  484. A string identifying the default serialization method to use. Can be
  485. `pickle` (default), `json`, `yaml`, `msgpack` or any custom serialization
  486. methods that have been registered with :mod:`kombu.serialization.registry`.
  487. .. seealso::
  488. :ref:`executing-serializers`.
  489. .. setting:: CELERY_TASK_PUBLISH_RETRY
  490. CELERY_TASK_PUBLISH_RETRY
  491. ~~~~~~~~~~~~~~~~~~~~~~~~~
  492. .. versionadded:: 2.2
  493. Decides if publishing task messages will be retried in the case
  494. of connection loss or other connection errors.
  495. See also :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`.
  496. Disabled by default.
  497. .. setting:: CELERY_TASK_PUBLISH_RETRY_POLICY
  498. CELERY_TASK_PUBLISH_RETRY_POLICY
  499. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  500. .. versionadded:: 2.2
  501. Defines the default policy when retrying publishing a task message in
  502. the case of connection loss or other connection errors.
  503. This is a mapping that must contain the following keys:
  504. * `max_retries`
  505. Maximum number of retries before giving up, in this case the
  506. exception that caused the retry to fail will be raised.
  507. A value of 0 or :const:`None` means it will retry forever.
  508. The default is to retry 3 times.
  509. * `interval_start`
  510. Defines the number of seconds (float or integer) to wait between
  511. retries. Default is 0, which means the first retry will be
  512. instantaneous.
  513. * `interval_step`
  514. On each consecutive retry this number will be added to the retry
  515. delay (float or integer). Default is 0.2.
  516. * `interval_max`
  517. Maximum number of seconds (float or integer) to wait between
  518. retries. Default is 0.2.
  519. With the default policy of::
  520. {"max_retries": 3,
  521. "interval_start": 0,
  522. "interval_step": 0.2,
  523. "interval_max": 0.2}
  524. the maximum time spent retrying will be 0.4 seconds. It is set relatively
  525. short by default because a connection failure could lead to a retry pile effect
  526. if the broker connection is down: e.g. many web server processes waiting
  527. to retry blocking other incoming requests.
  528. .. setting:: CELERY_DEFAULT_RATE_LIMIT
  529. CELERY_DEFAULT_RATE_LIMIT
  530. ~~~~~~~~~~~~~~~~~~~~~~~~~
  531. The global default rate limit for tasks.
  532. This value is used for tasks that does not have a custom rate limit
  533. The default is no rate limit.
  534. .. setting:: CELERY_DISABLE_RATE_LIMITS
  535. CELERY_DISABLE_RATE_LIMITS
  536. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  537. Disable all rate limits, even if tasks has explicit rate limits set.
  538. .. setting:: CELERY_ACKS_LATE
  539. CELERY_ACKS_LATE
  540. ~~~~~~~~~~~~~~~~
  541. Late ack means the task messages will be acknowledged **after** the task
  542. has been executed, not *just before*, which is the default behavior.
  543. .. seealso::
  544. FAQ: :ref:`faq-acks_late-vs-retry`.
  545. .. _conf-celeryd:
  546. Worker: celeryd
  547. ---------------
  548. .. setting:: CELERY_IMPORTS
  549. CELERY_IMPORTS
  550. ~~~~~~~~~~~~~~
  551. A sequence of modules to import when the celery daemon starts.
  552. This is used to specify the task modules to import, but also
  553. to import signal handlers and additional remote control commands, etc.
  554. .. setting:: CELERYD_MAX_TASKS_PER_CHILD
  555. CELERYD_MAX_TASKS_PER_CHILD
  556. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  557. Maximum number of tasks a pool worker process can execute before
  558. it's replaced with a new one. Default is no limit.
  559. .. setting:: CELERYD_TASK_TIME_LIMIT
  560. CELERYD_TASK_TIME_LIMIT
  561. ~~~~~~~~~~~~~~~~~~~~~~~
  562. Task hard time limit in seconds. The worker processing the task will
  563. be killed and replaced with a new one when this is exceeded.
  564. .. setting:: CELERYD_TASK_SOFT_TIME_LIMIT
  565. CELERYD_TASK_SOFT_TIME_LIMIT
  566. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  567. Task soft time limit in seconds.
  568. The :exc:`~celery.exceptions.SoftTimeLimitExceeded` exception will be
  569. raised when this is exceeded. The task can catch this to
  570. e.g. clean up before the hard time limit comes.
  571. Example:
  572. .. code-block:: python
  573. from celery.task import task
  574. from celery.exceptions import SoftTimeLimitExceeded
  575. @task()
  576. def mytask():
  577. try:
  578. return do_work()
  579. except SoftTimeLimitExceeded:
  580. cleanup_in_a_hurry()
  581. .. setting:: CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  582. CELERY_STORE_ERRORS_EVEN_IF_IGNORED
  583. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  584. If set, the worker stores all task errors in the result store even if
  585. :attr:`Task.ignore_result <celery.task.base.Task.ignore_result>` is on.
  586. .. setting:: CELERYD_STATE_DB
  587. CELERYD_STATE_DB
  588. ~~~~~~~~~~~~~~~~
  589. Name of the file used to stores persistent worker state (like revoked tasks).
  590. Can be a relative or absolute path, but be aware that the suffix `.db`
  591. may be appended to the file name (depending on Python version).
  592. Can also be set via the :option:`--statedb` argument to
  593. :mod:`~celery.bin.celeryd`.
  594. Not enabled by default.
  595. .. setting:: CELERYD_ETA_SCHEDULER_PRECISION
  596. CELERYD_ETA_SCHEDULER_PRECISION
  597. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  598. Set the maximum time in seconds that the ETA scheduler can sleep between
  599. rechecking the schedule. Default is 1 second.
  600. Setting this value to 1 second means the schedulers precision will
  601. be 1 second. If you need near millisecond precision you can set this to 0.1.
  602. .. _conf-error-mails:
  603. Error E-Mails
  604. -------------
  605. .. setting:: CELERY_SEND_TASK_ERROR_EMAILS
  606. CELERY_SEND_TASK_ERROR_EMAILS
  607. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  608. The default value for the `Task.send_error_emails` attribute, which if
  609. set to :const:`True` means errors occurring during task execution will be
  610. sent to :setting:`ADMINS` by email.
  611. .. setting:: ADMINS
  612. ADMINS
  613. ~~~~~~
  614. List of `(name, email_address)` tuples for the administrators that should
  615. receive error emails.
  616. .. setting:: SERVER_EMAIL
  617. SERVER_EMAIL
  618. ~~~~~~~~~~~~
  619. The email address this worker sends emails from.
  620. Default is celery@localhost.
  621. .. setting:: EMAIL_HOST
  622. EMAIL_HOST
  623. ~~~~~~~~~~
  624. The mail server to use. Default is `"localhost"`.
  625. .. setting:: EMAIL_HOST_USER
  626. EMAIL_HOST_USER
  627. ~~~~~~~~~~~~~~~
  628. User name (if required) to log on to the mail server with.
  629. .. setting:: EMAIL_HOST_PASSWORD
  630. EMAIL_HOST_PASSWORD
  631. ~~~~~~~~~~~~~~~~~~~
  632. Password (if required) to log on to the mail server with.
  633. .. setting:: EMAIL_PORT
  634. EMAIL_PORT
  635. ~~~~~~~~~~
  636. The port the mail server is listening on. Default is `25`.
  637. .. setting:: EMAIL_USE_SSL
  638. EMAIL_USE_SSL
  639. ~~~~~~~~~~~~~
  640. Use SSL when connecting to the SMTP server. Disabled by default.
  641. .. setting:: EMAIL_USE_TLS
  642. EMAIL_USE_TLS
  643. ~~~~~~~~~~~~~
  644. Use TLS when connecting to the SMTP server. Disabled by default.
  645. .. setting:: EMAIL_TIMEOUT
  646. EMAIL_TIMEOUT
  647. ~~~~~~~~~~~~~
  648. Timeout in seconds for when we give up trying to connect
  649. to the SMTP server when sending emails.
  650. The default is 2 seconds.
  651. .. _conf-example-error-mail-config:
  652. Example E-Mail configuration
  653. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  654. This configuration enables the sending of error emails to
  655. george@vandelay.com and kramer@vandelay.com:
  656. .. code-block:: python
  657. # Enables error emails.
  658. CELERY_SEND_TASK_ERROR_EMAILS = True
  659. # Name and email addresses of recipients
  660. ADMINS = (
  661. ("George Costanza", "george@vandelay.com"),
  662. ("Cosmo Kramer", "kosmo@vandelay.com"),
  663. )
  664. # Email address used as sender (From field).
  665. SERVER_EMAIL = "no-reply@vandelay.com"
  666. # Mailserver configuration
  667. EMAIL_HOST = "mail.vandelay.com"
  668. EMAIL_PORT = 25
  669. # EMAIL_HOST_USER = "servers"
  670. # EMAIL_HOST_PASSWORD = "s3cr3t"
  671. .. _conf-events:
  672. Events
  673. ------
  674. .. setting:: CELERY_SEND_EVENTS
  675. CELERY_SEND_EVENTS
  676. ~~~~~~~~~~~~~~~~~~
  677. Send events so the worker can be monitored by tools like `celerymon`.
  678. .. setting:: CELERY_SEND_TASK_SENT_EVENT
  679. CELERY_SEND_TASK_SENT_EVENT
  680. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  681. .. versionadded:: 2.2
  682. If enabled, a `task-sent` event will be sent for every task so tasks can be
  683. tracked before they are consumed by a worker.
  684. Disabled by default.
  685. .. setting:: CELERY_EVENT_SERIALIZER
  686. CELERY_EVENT_SERIALIZER
  687. ~~~~~~~~~~~~~~~~~~~~~~~
  688. Message serialization format used when sending event messages.
  689. Default is `"json"`. See :ref:`executing-serializers`.
  690. .. _conf-broadcast:
  691. Broadcast Commands
  692. ------------------
  693. .. setting:: CELERY_BROADCAST_QUEUE
  694. CELERY_BROADCAST_QUEUE
  695. ~~~~~~~~~~~~~~~~~~~~~~
  696. Name prefix for the queue used when listening for broadcast messages.
  697. The workers host name will be appended to the prefix to create the final
  698. queue name.
  699. Default is `"celeryctl"`.
  700. .. setting:: CELERY_BROADCAST_EXCHANGE
  701. CELERY_BROADCAST_EXCHANGE
  702. ~~~~~~~~~~~~~~~~~~~~~~~~~
  703. Name of the exchange used for broadcast messages.
  704. Default is `"celeryctl"`.
  705. .. setting:: CELERY_BROADCAST_EXCHANGE_TYPE
  706. CELERY_BROADCAST_EXCHANGE_TYPE
  707. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  708. Exchange type used for broadcast messages. Default is `"fanout"`.
  709. .. _conf-logging:
  710. Logging
  711. -------
  712. .. setting:: CELERYD_HIJACK_ROOT_LOGGER
  713. CELERYD_HIJACK_ROOT_LOGGER
  714. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  715. .. versionadded:: 2.2
  716. By default any previously configured logging options will be reset,
  717. because the Celery programs "hijacks" the root logger.
  718. If you want to customize your own logging then you can disable
  719. this behavior.
  720. .. note::
  721. Logging can also be customized by connecting to the
  722. :signal:`celery.signals.setup_logging` signal.
  723. .. setting:: CELERYD_LOG_COLOR
  724. CELERYD_LOG_COLOR
  725. ~~~~~~~~~~~~~~~~~
  726. Enables/disables colors in logging output by the Celery apps.
  727. By default colors are enabled if
  728. 1) the app is logging to a real terminal, and not a file.
  729. 2) the app is not running on Windows.
  730. .. setting:: CELERYD_LOG_FORMAT
  731. CELERYD_LOG_FORMAT
  732. ~~~~~~~~~~~~~~~~~~
  733. The format to use for log messages.
  734. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  735. See the Python :mod:`logging` module for more information about log
  736. formats.
  737. .. setting:: CELERYD_TASK_LOG_FORMAT
  738. CELERYD_TASK_LOG_FORMAT
  739. ~~~~~~~~~~~~~~~~~~~~~~~
  740. The format to use for log messages logged in tasks. Can be overridden using
  741. the :option:`--loglevel` option to :mod:`~celery.bin.celeryd`.
  742. Default is::
  743. [%(asctime)s: %(levelname)s/%(processName)s]
  744. [%(task_name)s(%(task_id)s)] %(message)s
  745. See the Python :mod:`logging` module for more information about log
  746. formats.
  747. .. setting:: CELERY_REDIRECT_STDOUTS
  748. CELERY_REDIRECT_STDOUTS
  749. ~~~~~~~~~~~~~~~~~~~~~~~
  750. If enabled `stdout` and `stderr` will be redirected
  751. to the current logger.
  752. Enabled by default.
  753. Used by :program:`celeryd` and :program:`celerybeat`.
  754. .. setting:: CELERY_REDIRECT_STDOUTS_LEVEL
  755. CELERY_REDIRECT_STDOUTS_LEVEL
  756. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  757. The log level output to `stdout` and `stderr` is logged as.
  758. Can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  759. :const:`ERROR` or :const:`CRITICAL`.
  760. Default is :const:`WARNING`.
  761. .. _conf-custom-components:
  762. Security
  763. --------
  764. .. setting:: CELERY_SECURITY_KEY
  765. CELERY_SECURITY_KEY
  766. ~~~~~~~~~~~~~~~~~~~
  767. .. versionadded:: 2.5
  768. The relative or absolute path to a file containing the private key
  769. used to sign messages when :ref:`message-signing` is used.
  770. .. setting:: CELERY_SECURITY_CERTIFICATE
  771. CELERY_SECURITY_CERTIFICATE
  772. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  773. .. versionadded:: 2.5
  774. The relative or absolute path to an X.509 certificate file
  775. used to sign messages when :ref:`message-signing` is used.
  776. .. setting:: CELERY_SECURITY_CERT_STORE
  777. CELERY_SECURITY_CERT_STORE
  778. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  779. .. versionadded:: 2.5
  780. The directory containing X.509 certificates used for
  781. :ref:`message signing`. Can be a glob with wildcards,
  782. (for example :file:`/etc/certs/*.pem`).
  783. Custom Component Classes (advanced)
  784. -----------------------------------
  785. .. setting:: CELERYD_POOL
  786. CELERYD_POOL
  787. ~~~~~~~~~~~~
  788. Name of the pool class used by the worker.
  789. You can use a custom pool class name, or select one of
  790. the built-in aliases: ``processes``, ``eventlet``, ``gevent``.
  791. Default is ``processes``.
  792. .. setting:: CELERYD_AUTOSCALER
  793. CELERYD_AUTOSCALER
  794. ~~~~~~~~~~~~~~~~~~
  795. .. versionadded:: 2.2
  796. Name of the autoscaler class to use.
  797. Default is ``"celery.worker.autoscale.Autoscaler"``.
  798. .. setting:: CELERYD_CONSUMER
  799. CELERYD_CONSUMER
  800. ~~~~~~~~~~~~~~~~
  801. Name of the consumer class used by the worker.
  802. Default is :class:`celery.worker.consumer.Consumer`
  803. .. setting:: CELERYD_MEDIATOR
  804. CELERYD_MEDIATOR
  805. ~~~~~~~~~~~~~~~~
  806. Name of the mediator class used by the worker.
  807. Default is :class:`celery.worker.controllers.Mediator`.
  808. .. setting:: CELERYD_ETA_SCHEDULER
  809. CELERYD_ETA_SCHEDULER
  810. ~~~~~~~~~~~~~~~~~~~~~
  811. Name of the ETA scheduler class used by the worker.
  812. Default is :class:`celery.utils.timer2.Timer`, or one overrided
  813. by the pool implementation.
  814. .. _conf-celerybeat:
  815. Periodic Task Server: celerybeat
  816. --------------------------------
  817. .. setting:: CELERYBEAT_SCHEDULE
  818. CELERYBEAT_SCHEDULE
  819. ~~~~~~~~~~~~~~~~~~~
  820. The periodic task schedule used by :mod:`~celery.bin.celerybeat`.
  821. See :ref:`beat-entries`.
  822. .. setting:: CELERYBEAT_SCHEDULER
  823. CELERYBEAT_SCHEDULER
  824. ~~~~~~~~~~~~~~~~~~~~
  825. The default scheduler class. Default is
  826. `"celery.beat.PersistentScheduler"`.
  827. Can also be set via the :option:`-S` argument to
  828. :mod:`~celery.bin.celerybeat`.
  829. .. setting:: CELERYBEAT_SCHEDULE_FILENAME
  830. CELERYBEAT_SCHEDULE_FILENAME
  831. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  832. Name of the file used by `PersistentScheduler` to store the last run times
  833. of periodic tasks. Can be a relative or absolute path, but be aware that the
  834. suffix `.db` may be appended to the file name (depending on Python version).
  835. Can also be set via the :option:`--schedule` argument to
  836. :mod:`~celery.bin.celerybeat`.
  837. .. setting:: CELERYBEAT_MAX_LOOP_INTERVAL
  838. CELERYBEAT_MAX_LOOP_INTERVAL
  839. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  840. The maximum number of seconds :mod:`~celery.bin.celerybeat` can sleep
  841. between checking the schedule. Default is 300 seconds (5 minutes).
  842. .. _conf-celerymon:
  843. Monitor Server: celerymon
  844. -------------------------
  845. .. setting:: CELERYMON_LOG_FORMAT
  846. CELERYMON_LOG_FORMAT
  847. ~~~~~~~~~~~~~~~~~~~~
  848. The format to use for log messages.
  849. Default is `[%(asctime)s: %(levelname)s/%(processName)s] %(message)s`
  850. See the Python :mod:`logging` module for more information about log
  851. formats.
  852. .. _conf-deprecated:
  853. Deprecated Settings
  854. -------------------
  855. These settings have been deprecated and should no longer used,
  856. as they will be removed in future versions.
  857. .. setting:: CELERY_AMQP_TASK_RESULT_EXPIRES
  858. CELERY_AMQP_TASK_RESULT_EXPIRES
  859. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  860. .. deprecated:: 2.5
  861. The time in seconds of which the task result queues should expire.
  862. This setting is deprecated, and will be removed in version 3.0.
  863. Please use :setting:`CELERY_TASK_RESULT_EXPIRES` instead.
  864. .. note::
  865. AMQP result expiration requires RabbitMQ versions 2.1.0 and higher.
  866. .. setting:: CELERY_TASK_ERROR_WHITELIST
  867. CELERY_TASK_ERROR_WHITELIST
  868. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  869. .. deprecated:: 2.5
  870. A white list of exceptions to send error emails for.
  871. This option is pending deprecation and is scheduled for removal
  872. in version 3.0.
  873. .. setting:: CELERYD_LOG_FILE
  874. CELERYD_LOG_FILE
  875. ~~~~~~~~~~~~~~~~
  876. .. deprecated:: 2.4
  877. This option is deprecated and is scheduled for removal in version 3.0.
  878. Please use the :option:`--logfile` argument instead.
  879. The default file name the worker daemon logs messages to. Can be overridden
  880. using the :option:`--logfile` option to :mod:`~celery.bin.celeryd`.
  881. The default is :const:`None` (`stderr`)
  882. .. setting:: CELERYD_LOG_LEVEL
  883. CELERYD_LOG_LEVEL
  884. ~~~~~~~~~~~~~~~~~
  885. .. deprecated:: 2.4
  886. This option is deprecated and is scheduled for removal in version 3.0.
  887. Please use the :option:`--loglevel` argument instead.
  888. Worker log level, can be one of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  889. :const:`ERROR` or :const:`CRITICAL`.
  890. Can also be set via the :option:`--loglevel` argument to
  891. :mod:`~celery.bin.celeryd`.
  892. See the :mod:`logging` module for more information.
  893. .. setting:: CELERYBEAT_LOG_FILE
  894. CELERYBEAT_LOG_FILE
  895. ~~~~~~~~~~~~~~~~~~~
  896. .. deprecated:: 2.4
  897. This option is deprecated and is scheduled for removal in version 3.0.
  898. Please use the :option:`--logfile` argument instead.
  899. The default file name to log messages to. Can be overridden using
  900. the `--logfile` option to :mod:`~celery.bin.celerybeat`.
  901. The default is :const:`None` (`stderr`).
  902. .. setting:: CELERYBEAT_LOG_LEVEL
  903. CELERYBEAT_LOG_LEVEL
  904. ~~~~~~~~~~~~~~~~~~~~
  905. .. deprecated:: 2.4
  906. This option is deprecated and is scheduled for removal in version 3.0.
  907. Please use the :option:`--loglevel` argument instead.
  908. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  909. :const:`ERROR`, or :const:`CRITICAL`.
  910. Can also be set via the :option:`--loglevel` argument to
  911. :mod:`~celery.bin.celerybeat`.
  912. See the :mod:`logging` module for more information.
  913. .. setting:: CELERYMON_LOG_FILE
  914. CELERYMON_LOG_FILE
  915. ~~~~~~~~~~~~~~~~~~
  916. .. deprecated:: 2.4
  917. This option is deprecated and is scheduled for removal in version 3.0.
  918. Please use the :option:`--logfile` argument instead.
  919. The default file name to log messages to. Can be overridden using
  920. the :option:`--logfile` argument to `celerymon`.
  921. The default is :const:`None` (`stderr`)
  922. .. setting:: CELERYMON_LOG_LEVEL
  923. CELERYMON_LOG_LEVEL
  924. ~~~~~~~~~~~~~~~~~~~
  925. .. deprecated:: 2.4
  926. This option is deprecated and is scheduled for removal in version 3.0.
  927. Please use the :option:`--loglevel` argument instead.
  928. Logging level. Can be any of :const:`DEBUG`, :const:`INFO`, :const:`WARNING`,
  929. :const:`ERROR`, or :const:`CRITICAL`.
  930. See the :mod:`logging` module for more information.