configuration.rst 37 KB

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