celery.conf.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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_ROUTING_KEY
  13. Default routing key used when sending tasks.
  14. .. data:: BROKER_CONNECTION_TIMEOUT
  15. The timeout in seconds before we give up establishing a connection
  16. to the AMQP server.
  17. .. data:: CELERY_SEND_TASK_ERROR_EMAILS
  18. If set to ``True``, errors in tasks will be sent to admins by e-mail.
  19. If unset, it will send the e-mails if ``settings.DEBUG`` is False.
  20. .. data:: ALWAYS_EAGER
  21. Always execute tasks locally, don't send to the queue.
  22. .. data:: TASK_RESULT_EXPIRES
  23. Task tombstone expire time in seconds.
  24. .. data:: BROKER_CONNECTION_RETRY
  25. Automatically try to re-establish the connection to the AMQP broker if
  26. it's lost.
  27. .. data:: BROKER_CONNECTION_MAX_RETRIES
  28. Maximum number of retries before we give up re-establishing a connection
  29. to the broker.
  30. If this is set to ``0`` or ``None``, we will retry forever.
  31. Default is ``100`` retries.
  32. .. data:: TASK_SERIALIZER
  33. A string identifying the default serialization
  34. method to use. Can be ``pickle`` (default),
  35. ``json``, ``yaml``, or any custom serialization methods that have
  36. been registered with :mod:`carrot.serialization.registry`.
  37. Default is ``pickle``.
  38. .. data:: RESULT_BACKEND
  39. The backend used to store task results (tombstones).
  40. .. data:: CELERY_CACHE_BACKEND
  41. Use a custom cache backend for celery. If not set the django-global
  42. cache backend in ``CACHE_BACKEND`` will be used.
  43. .. data:: CELERY_SEND_EVENTS
  44. If set, celery will send events that can be captured by monitors like
  45. ``celerymon``.
  46. Default is: ``False``.
  47. .. data:: DEFAULT_RATE_LIMIT
  48. The default rate limit applied to all tasks which doesn't have a custom
  49. rate limit defined. (Default: None)
  50. .. data:: DISABLE_RATE_LIMITS
  51. If ``True`` all rate limits will be disabled and all tasks will be executed
  52. as soon as possible.
  53. .. data:: CELERYBEAT_LOG_LEVEL
  54. Default log level for celerybeat.
  55. Default is: ``INFO``.
  56. .. data:: CELERYBEAT_LOG_FILE
  57. Default log file for celerybeat.
  58. Default is: ``None`` (stderr)
  59. .. data:: CELERYBEAT_SCHEDULE_FILENAME
  60. Name of the persistent schedule database file.
  61. Default is: ``celerybeat-schedule``.
  62. .. data:: CELERYBEAT_MAX_LOOP_INTERVAL
  63. The maximum number of seconds celerybeat is allowed to sleep between
  64. checking the schedule. The default is 5 minutes, which means celerybeat can
  65. only sleep a maximum of 5 minutes after checking the schedule run-times for a
  66. periodic task to apply. If you change the run_times of periodic tasks at
  67. run-time, you may consider lowering this value for changes to take effect
  68. faster (A value of 5 minutes, means the changes will take effect in 5 minutes
  69. at maximum).
  70. .. data:: CELERYMON_LOG_LEVEL
  71. Default log level for celerymon.
  72. Default is: ``INFO``.
  73. .. data:: CELERYMON_LOG_FILE
  74. Default log file for celerymon.
  75. Default is: ``None`` (stderr)
  76. .. data:: LOG_LEVELS
  77. Mapping of log level names to :mod:`logging` module constants.
  78. .. data:: LOG_FORMAT
  79. The format to use for log messages.
  80. .. data:: CELERYD_LOG_FILE
  81. Filename of the daemon log file.
  82. Default is: ``None`` (stderr)
  83. .. data:: CELERYD_LOG_LEVEL
  84. Default log level for daemons. (``WARN``)
  85. .. data:: CELERYD_CONCURRENCY
  86. The number of concurrent worker processes.
  87. If set to ``0``, the total number of available CPUs/cores will be used.