mirror of
https://github.com/GSA/notifications-api.git
synced 2026-04-04 17:39:57 -04:00
Kill the other processes started by the script
We use exec to start awslogs_agent and then a tail to print logs to stdout. CF docs[1] recommend to use exec to start processes which seems to imply that as long as there are commands running the container will remain up and running. This commit ensures that if there are no celery tasks running we will kill any other processes that we have started, so that the container will no longer be considered healthy by cloudfoundry and will be replaced. 1: https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#start-commands
This commit is contained in:
@@ -113,6 +113,10 @@ function ensure_celery_is_running {
|
||||
|
||||
sleep 15
|
||||
|
||||
echo "Killing awslogs_agent and tail"
|
||||
kill -9 ${AWSLOGS_AGENT_PID}
|
||||
kill -9 ${LOGS_TAIL_PID}
|
||||
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user