celery.conf.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. ============================
  2. Configuration - celery.conf
  3. ============================
  4. .. data:: QUEUES
  5. Queue name/options mapping.
  6. .. data:: DEFAULT_QUEUE
  7. Name of the default queue.
  8. .. data:: DEFAULT_EXCHANGE
  9. Default exchange.
  10. .. data:: DEFAULT_EXCHANGE_TYPE
  11. Default exchange type.
  12. .. data:: DEFAULT_DELIVERY_MODE
  13. Default delivery mode (``"persistent"`` or ``"non-persistent"``).
  14. Default is ``"persistent"``.
  15. .. data:: DEFAULT_ROUTING_KEY
  16. Default routing key used when sending tasks.
  17. .. data:: BROKER_CONNECTION_TIMEOUT
  18. The timeout in seconds before we give up establishing a connection
  19. to the AMQP server.
  20. .. data:: BROADCAST_QUEUE
  21. Name prefix for the queue used when listening for
  22. broadcast messages. The workers hostname will be appended
  23. to the prefix to create the final queue name.
  24. Default is ``"celeryctl"``.
  25. .. data:: BROADCAST_EXCHANGE
  26. Name of the exchange used for broadcast messages.
  27. Default is ``"celeryctl"``.
  28. .. data:: BROADCAST_EXCHANGE_TYPE
  29. Exchange type used for broadcast messages. Default is ``"fanout"``.
  30. .. data:: EVENT_QUEUE
  31. Name of queue used to listen for event messages. Default is
  32. ``"celeryevent"``.
  33. .. data:: EVENT_EXCHANGE
  34. Exchange used to send event messages. Default is ``"celeryevent"``.
  35. .. data:: EVENT_EXCHANGE_TYPE
  36. Exchange type used for the event exchange. Default is ``"topic"``.
  37. .. data:: EVENT_ROUTING_KEY
  38. Routing key used for events. Default is ``"celeryevent"``.
  39. .. data:: EVENT_SERIALIZER
  40. Type of serialization method used to serialize events. Default is
  41. ``"json"``.
  42. .. data:: RESULT_EXCHANGE
  43. Exchange used by the AMQP result backend to publish task results.
  44. Default is ``"celeryresult"``.
  45. .. data:: CELERY_SEND_TASK_ERROR_EMAILS
  46. If set to ``True``, errors in tasks will be sent to admins by e-mail.
  47. If unset, it will send the e-mails if ``settings.DEBUG`` is ``True``.
  48. .. data:: ALWAYS_EAGER
  49. Always execute tasks locally, don't send to the queue.
  50. .. data:: TASK_RESULT_EXPIRES
  51. Task tombstone expire time in seconds.
  52. .. data:: IGNORE_RESULT
  53. If enabled, the default behavior will be to not store task results.
  54. .. data:: TRACK_STARTED
  55. If enabled, the default behavior will be to track when tasks starts by
  56. storing the :const:`STARTED` state.
  57. .. data:: ACKS_LATE
  58. If enabled, the default behavior will be to acknowledge task messages
  59. after the task is executed.
  60. .. data:: STORE_ERRORS_EVEN_IF_IGNORED
  61. If enabled, task errors will be stored even though ``Task.ignore_result``
  62. is enabled.
  63. .. data:: MAX_CACHED_RESULTS
  64. Total number of results to store before results are evicted from the
  65. result cache.
  66. .. data:: BROKER_CONNECTION_RETRY
  67. Automatically try to re-establish the connection to the AMQP broker if
  68. it's lost.
  69. .. data:: BROKER_CONNECTION_MAX_RETRIES
  70. Maximum number of retries before we give up re-establishing a connection
  71. to the broker.
  72. If this is set to ``0`` or ``None``, we will retry forever.
  73. Default is ``100`` retries.
  74. .. data:: TASK_SERIALIZER
  75. A string identifying the default serialization
  76. method to use. Can be ``pickle`` (default),
  77. ``json``, ``yaml``, or any custom serialization methods that have
  78. been registered with :mod:`carrot.serialization.registry`.
  79. Default is ``pickle``.
  80. .. data:: RESULT_BACKEND
  81. The backend used to store task results (tombstones).
  82. .. data:: CELERY_CACHE_BACKEND
  83. Celery cache backend.
  84. .. data:: SEND_EVENTS
  85. If set, celery will send events that can be captured by monitors like
  86. ``celerymon``.
  87. Default is: ``False``.
  88. .. data:: DEFAULT_RATE_LIMIT
  89. The default rate limit applied to all tasks which doesn't have a custom
  90. rate limit defined. (Default: None)
  91. .. data:: DISABLE_RATE_LIMITS
  92. If ``True`` all rate limits will be disabled and all tasks will be executed
  93. as soon as possible.
  94. .. data:: CELERYBEAT_LOG_LEVEL
  95. Default log level for celerybeat.
  96. Default is: ``INFO``.
  97. .. data:: CELERYBEAT_LOG_FILE
  98. Default log file for celerybeat.
  99. Default is: ``None`` (stderr)
  100. .. data:: CELERYBEAT_SCHEDULE_FILENAME
  101. Name of the persistent schedule database file.
  102. Default is: ``celerybeat-schedule``.
  103. .. data:: CELERYBEAT_MAX_LOOP_INTERVAL
  104. The maximum number of seconds celerybeat is allowed to sleep between
  105. checking the schedule. The default is 5 minutes, which means celerybeat can
  106. only sleep a maximum of 5 minutes after checking the schedule run-times for a
  107. periodic task to apply. If you change the run_times of periodic tasks at
  108. run-time, you may consider lowering this value for changes to take effect
  109. faster (A value of 5 minutes, means the changes will take effect in 5 minutes
  110. at maximum).
  111. .. data:: CELERYMON_LOG_LEVEL
  112. Default log level for celerymon.
  113. Default is: ``INFO``.
  114. .. data:: CELERYMON_LOG_FILE
  115. Default log file for celerymon.
  116. Default is: ``None`` (stderr)
  117. .. data:: LOG_LEVELS
  118. Mapping of log level names to :mod:`logging` module constants.
  119. .. data:: CELERYD_LOG_FORMAT
  120. The format to use for log messages.
  121. .. data:: CELERYD_TASK_LOG_FORMAT
  122. The format to use for task log messages.
  123. .. data:: CELERYD_LOG_FILE
  124. Filename of the daemon log file.
  125. Default is: ``None`` (stderr)
  126. .. data:: CELERYD_LOG_LEVEL
  127. Default log level for daemons. (``WARN``)
  128. .. data:: CELERYD_CONCURRENCY
  129. The number of concurrent worker processes.
  130. If set to ``0``, the total number of available CPUs/cores will be used.
  131. .. data:: CELERYD_PREFETCH_MULTIPLIER
  132. The number of concurrent workers is multipled by this number to yield
  133. the wanted AMQP QoS message prefetch count.
  134. .. data:: CELERYD_POOL
  135. Name of the task pool class used by the worker.
  136. Default is ``"celery.worker.pool.TaskPool"`.
  137. .. data:: CELERYD_LISTENER
  138. Name of the listener class used by the worker.
  139. Default is ``"celery.worker.listener.CarrotListener"``.
  140. .. data:: CELERYD_MEDIATOR
  141. Name of the mediator class used by the worker.
  142. Default is ``"celery.worker.controllers.Mediator"``.
  143. .. data:: CELERYD_ETA_SCHEDULER
  144. Name of the ETA scheduler class used by the worker.
  145. Default is ``"celery.worker.controllers.ScheduleController"``.