Run supervisorctl only on API and worker instances

Change-Id: I281228ee29c5003ef082e4702cfa161bd02bcc6d
This commit is contained in:
Christian Berendt 2015-04-03 10:01:54 +02:00
parent 77db956fc1
commit 7a1965cbf4
2 changed files with 5 additions and 3 deletions

View File

@ -3,4 +3,4 @@
tasks:
- apt: update-cache=yes upgrade=yes
- command: /vagrant/contrib/install.sh -i faafo -i messaging -i database -r api -r worker -r demo -d 'mysql://faafo:password@%localhost:3306/faafo' -m 'amqp://guest:guest@localhost:5672/' -e 'http://localhost'
- command: /vagrant/contrib/install.sh -i faafo -i messaging -i database -r api -r worker -r demo -d 'mysql://faafo:password@localhost:3306/faafo' -m 'amqp://guest:guest@localhost:5672/' -e 'http://localhost'

View File

@ -135,8 +135,10 @@ command=$(which faafo-worker)
priority=20" | sudo tee -a /etc/supervisor/conf.d/faafo.conf
fi
sudo supervisorctl reload
sleep 5
if [[ $RUN_WORKER -eq 1 || $RUN_API -eq 1 ]]; then
sudo supervisorctl reload
sleep 5
fi
if [[ $RUN_DEMO -eq 1 && $RUN_API -eq 1 ]]; then
faafo --endpoint-url $URL_ENDPOINT --debug create