The broker_connection_retry configuration setting will no longer determine whether broker connection retries are made during startup in Celery 6.0 and above. If you wish to refrain from retrying connections on startup, you should set broker_connection_retry_on_startup to False instead.
Warning Celery will still be able to read old configuration files until Celery 6.0. Afterwards, support for the old configuration files will be removed. We provide the celery upgrade command that should handle plenty of cases (including Django). Please migrate to the new configuration scheme as soon as possible.
I am a strong proponent of strict separation of config from code. This means that my preferred app configuration is via environment variables (env vars). Env vars are easy to change between deploys. They do not require code changes. Env vars are lang…
The celery documentation helpfully gives an example of a configuration file, but it is less clear on where to put this file, or how to ensure that the worker reads this config file when it boots.
Example configuration file This is an example configuration file to get you started. It should contain all you need to run a basic Celery set-up.
Celery is now using Read the Docs to host the documentation for the development version, where the pages are automatically updated as new changes are made (YAY!)
Example configuration file ¶ This is an example configuration file to get you started. It should contain all you need to run a basic Celery set-up. ## Broker settings. BROKER_URL = ‘amqp://guest:guest@localhost:5672//’ # List of modules to import when celery starts.
Concurrency pool of Celery is a different discussion and there is a nice article about it. The rule of thumb is, For CPU bound tasks use prefork concurrency and for I/O bound tasks, use gevent/eventlet. Don’t use more number than available CPU cores with prefork (default) pool but, for gevent/eventlet pool, you can use hundreds or even thousands. broker_pool_limit (int | None) celery_app.conf …
Task registration is the process by which callable functions are transformed into Celery task instances and associated with a Celery application. This page documents the @app.task decorator, the task registry, lazy evaluation mechanics, and shared task patterns.
Learn how to configure Celery settings to suit your project’s needs. Step-by-step tips on adjusting brokers, task serialization, result backends, and scheduling with clear examples.