celeryd

Celery cannot find a worker

Celery cannot find a worker Question: I’m using celery with such configuration default_exchange = Exchange(‘default’, type=’direct’) latest_exchange = Exchange(‘latest’, type=’direct’) shared_celery_config = { ‘BROKER_URL’: ‘redis://localhost:6379/0’, ‘CELERY_RESULT_BACKEND’: ‘redis://localhost:6379/0’, ‘CELERY_DEFAULT_EXCHANGE’: ‘default’, ‘CELERY_DEFAULT_ROUTING_KEY’: ‘default’, ‘CELERY_DEFAULT_QUEUE’: ‘default’, ‘CELERY_QUEUES’: ( Queue(‘default’, default_exchange, routing_key=’default’), Queue(‘latest’, latest_exchange, routing_key=’latest’), ), } celery = Celery(‘tasks’, config_source=shared_celery_config) But when I’m creating a task none of …

Total answers: 2

How to start a Celery worker from a script/module __main__?

How to start a Celery worker from a script/module __main__? Question: I’ve define a Celery app in a module, and now I want to start the worker from the same module in its __main__, i.e. by running the module with python -m instead of celery from the command line. I tried this: app = Celery(‘project’, …

Total answers: 6

Understanding celery task prefetching

Understanding celery task prefetching Question: I just found out about the configuration option CELERYD_PREFETCH_MULTIPLIER (docs). The default is 4, but (I believe) I want the prefetching off or as low as possible. I set it to 1 now, which is close enough to what I’m looking for, but there’s still some things I don’t understand: …

Total answers: 5