Reputation: 33625
I already have a celery process running on a server using this command:
celery -A tasks worker -Q main_tasks -l INFO -n main_tasks
Can I use the same command to run a second worker consuming form the same queue on another server or would there be a conflict with the name below -n
?
celery -A tasks worker -Q main_tasks -l INFO -n main_tasks
If so, can we make the name random?
Upvotes: 1
Views: 2031
Reputation: 7088
The documentation does note that the name should be unique per worker:
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker1.%h
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker2.%h
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker3.%h
Upvotes: 3