celery.conf.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ============================
  2. Configuration - celery.conf
  3. ============================
  4. .. data:: AMQP_EXCHANGE
  5. Name of the AMQP exchange.
  6. .. data:: AMQP_EXCHANGE_TYPE
  7. The exchange type.
  8. .. data:: AMQP_PUBLISHER_ROUTING_KEY
  9. The default AMQP routing key used when publishing tasks.
  10. .. data:: AMQP_CONSUMER_ROUTING_KEY
  11. The AMQP routing key used when consuming tasks.
  12. .. data:: AMQP_CONSUMER_QUEUE
  13. The name of the AMQP queue.
  14. .. data:: AMQP_CONSUMER_QUEUES
  15. Dictionary defining multiple AMQP queues.
  16. .. data:: AMQP_CONNECTION_TIMEOUT
  17. The timeout in seconds before we give up establishing a connection
  18. to the AMQP server.
  19. .. data:: SEND_CELERY_TASK_ERROR_EMAILS
  20. If set to ``True``, errors in tasks will be sent to admins by e-mail.
  21. If unset, it will send the e-mails if ``settings.DEBUG`` is False.
  22. .. data:: ALWAYS_EAGER
  23. Always execute tasks locally, don't send to the queue.
  24. .. data: TASK_RESULT_EXPIRES
  25. Task tombstone expire time in seconds.
  26. .. data:: AMQP_CONNECTION_RETRY
  27. Automatically try to re-establish the connection to the AMQP broker if
  28. it's lost.
  29. .. data:: AMQP_CONNECTION_MAX_RETRIES
  30. Maximum number of retries before we give up re-establishing a connection
  31. to the broker.
  32. If this is set to ``0`` or ``None``, we will retry forever.
  33. Default is ``100`` retries.
  34. .. data:: TASK_SERIALIZER
  35. A string identifying the default serialization
  36. method to use. Can be ``pickle`` (default),
  37. ``json``, ``yaml``, or any custom serialization methods that have
  38. been registered with :mod:`carrot.serialization.registry`.
  39. Default is ``pickle``.
  40. .. data:: CELERY_BACKEND
  41. The backend used to store task results (tombstones).
  42. .. data:: CELERY_CACHE_BACKEND
  43. Use a custom cache backend for celery. If not set the django-global
  44. cache backend in ``CACHE_BACKEND`` will be used.
  45. .. data:: CELERY_SEND_EVENTS
  46. If set, celery will send events that can be captured by monitors like
  47. ``celerymon``.
  48. Default is: ``False``.
  49. .. data:: DEFAULT_RATE_LIMIT
  50. The default rate limit applied to all tasks which doesn't have a custom
  51. rate limit defined. (Default: None)
  52. .. data:: DISABLE_RATE_LIMITS
  53. If ``True`` all rate limits will be disabled and all tasks will be executed
  54. as soon as possible.
  55. .. data:: CELERYBEAT_PID_FILE
  56. Name of celerybeats pid file.
  57. Default is: ``celerybeat.pid``.
  58. .. data:: CELERYBEAT_LOG_LEVEL
  59. Default log level for celerybeat.
  60. Default is: ``INFO``.
  61. .. data:: CELERYBEAT_LOG_FILE
  62. Default log file for celerybeat.
  63. Default is: ``celerybeat.log``.
  64. .. data:: CELERYBEAT_SCHEDULE_FILENAME
  65. Name of the persistent schedule database file.
  66. Default is: ``celerybeat-schedule``.
  67. .. data:: CELERYBEAT_MAX_LOOP_INTERVAL
  68. The maximum number of seconds celerybeat is allowed to sleep between
  69. checking the schedule. The default is 5 minutes, which means celerybeat can
  70. only sleep a maximum of 5 minutes after checking the schedule run-times for a
  71. periodic task to apply. If you change the run_times of periodic tasks at
  72. run-time, you may consider lowering this value for changes to take effect
  73. faster (A value of 5 minutes, means the changes will take effect in 5 minutes
  74. at maximum).
  75. .. data:: CELERYMON_PID_FILE
  76. Name of celerymons pid file.
  77. Default is: ``celerymon.pid``.
  78. .. data:: CELERYMON_LOG_LEVEL
  79. Default log level for celerymon.
  80. Default is: ``INFO``.
  81. .. data:: CELERYMON_LOG_FILE
  82. Default log file for celerymon.
  83. Default is: ``celerymon.log``.
  84. .. data:: LOG_LEVELS
  85. Mapping of log level names to :mod:`logging` module constants.
  86. .. data:: LOG_FORMAT
  87. The format to use for log messages.
  88. .. data:: DAEMON_LOG_FILE
  89. Filename of the daemon log file.
  90. .. data:: DAEMON_LOG_LEVEL
  91. Default log level for daemons. (``WARN``)
  92. .. data:: DAEMON_PID_FILE
  93. Full path to the daemon pidfile.
  94. .. data:: DAEMON_CONCURRENCY
  95. The number of concurrent worker processes.
  96. If set to ``0``, the total number of available CPUs/cores will be used.