mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Start/Stop the new worker scripts on the code deploy actions.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user