mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Add 5 second sleep before stopping old api instances
This is to allow the new instances to start responding to the http healthchecks and start serving traffic.
This commit is contained in:
1
Makefile
1
Makefile
@@ -208,6 +208,7 @@ cf-deploy: ## Deploys the app to Cloud Foundry
|
|||||||
cf rename ${CF_APP} ${CF_APP}-rollback
|
cf rename ${CF_APP} ${CF_APP}-rollback
|
||||||
cf push ${CF_APP} -f <(make -s generate-manifest)
|
cf push ${CF_APP} -f <(make -s generate-manifest)
|
||||||
cf scale -i $$(cf curl /v2/apps/$$(cf app --guid ${CF_APP}-rollback) | jq -r ".entity.instances" 2>/dev/null || echo "1") ${CF_APP}
|
cf scale -i $$(cf curl /v2/apps/$$(cf app --guid ${CF_APP}-rollback) | jq -r ".entity.instances" 2>/dev/null || echo "1") ${CF_APP}
|
||||||
|
if [ "${CF_APP}" == "notify-api" ]; then sleep 5; fi
|
||||||
cf stop ${CF_APP}-rollback
|
cf stop ${CF_APP}-rollback
|
||||||
# sleep for 10 seconds to try and make sure that all worker threads (either web api or celery) have finished before we delete
|
# sleep for 10 seconds to try and make sure that all worker threads (either web api or celery) have finished before we delete
|
||||||
# when we delete the DB is unbound from the app, which can cause "permission denied for relation" psycopg2 errors.
|
# when we delete the DB is unbound from the app, which can cause "permission denied for relation" psycopg2 errors.
|
||||||
|
|||||||
Reference in New Issue
Block a user