solar/bootstrap/playbooks/celery.yaml
Łukasz Oleś 10ea232d58 Only one worker for system_log queue
If there are more than on worker for system_log queue it may lead to races when saving the graph
2015-10-06 12:39:48 +02:00

22 lines
700 B
YAML

---
- name: Solar Celery config
hosts: all
sudo: yes
vars:
celery_dir: /var/run/celery
tasks:
- shell: mkdir -p {{ celery_dir }}
- shell: pip install celery
- shell: hostname
register: hostname
- shell: celery multi stop 2 -A solar.orchestration.runner
chdir={{ celery_dir }}
tags: [stop]
- shell: celery multi start 2 -A solar.orchestration.runner -P:2 prefork -c:1 1 -c:2 3 -Q:1 scheduler,system_log -Q:2 celery,{{ hostname.stdout }}
chdir={{ celery_dir }}
tags: [master]
- shell: celery multi start 1 -A solar.orchestration.runner -Q:1 {{ hostname.stdout }}
chdir={{ celery_dir }}
tags: [slave]