Start/Stop the new worker scripts on the code deploy actions.

This commit is contained in:
Martyn Inglis
2016-08-31 11:40:47 +01:00
parent c108c493e6
commit ce006bd92d
2 changed files with 32 additions and 2 deletions

View File

@@ -12,6 +12,18 @@ then
sudo service notifications-api-celery-worker start
fi
if [ -e "/etc/init/notifications-api-celery-worker-sender.conf" ]
then
echo "Starting celery worker"
sudo service notifications-api-celery-worker-sender start
fi
if [ -e "/etc/init/notifications-api-celery-worker-db.conf" ]
then
echo "Starting celery worker"
sudo service notifications-api-celery-worker-db start
fi
if [ -e "/etc/init/notifications-api-celery-beat.conf" ]
then
echo "Starting celery beat"

View File

@@ -19,7 +19,7 @@ fi
if [ -e "/etc/init/notifications-api-celery-beat.conf" ]; then
echo "stopping notifications-api-celery-beat"
if sudo service notifications-api-celery-beat stop; then
echo "notifications-api stopped"
echo "notifications-api beat stopped"
else
error_exit "Could not stop notifications-celery-beat"
fi
@@ -28,8 +28,26 @@ fi
if [ -e "/etc/init/notifications-api-celery-worker.conf" ]; then
echo "stopping notifications-api-celery-worker"
if sudo service notifications-api-celery-worker stop; then
echo "notifications-api stopped"
echo "notifications-api worker stopped"
else
error_exit "Could not stop notifications-celery-worker"
fi
fi
if [ -e "/etc/init/notifications-api-celery-worker-sender.conf" ]; then
echo "stopping notifications-api-celery-worker-sender"
if sudo service notifications-api-celery-worker-sender stop; then
echo "notifications-api sender worker stopped"
else
error_exit "Could not stop notifications-celery-worker-sender"
fi
fi
if [ -e "/etc/init/notifications-api-celery-worker-db.conf" ]; then
echo "stopping notifications-api-celery-worker-db"
if sudo service notifications-api-celery-worker-db stop; then
echo "notifications-api db worker stopped"
else
error_exit "Could not stop notifications-celery-worker-db"
fi
fi