deploy: maintenance-mode flag and a worker shutdown grace period - #106
Merged
Conversation
Maintenance mode: touching /srv/bdk/maintenance/on on the web host makes nginx answer every new request with a plain 503 + Retry-After (checked per request — no reload; rm restores instantly). In-flight requests are unaffected. The flag lives outside the checkout on purpose: deploy.sh refuses a dirty tree and an untracked flag file would count as dirty. Verified end-to-end against a stub backend (200 -> touch -> 503 with body -> rm -> 200). Worker stop_grace_period 15m: Docker's 10s default SIGKILLed celery's warm shutdown mid-task, which would kill a minutes-long tile build or fabric import on every deploy that caught one in flight. With the queue drained first, shutdown remains instant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a maintenance mode for upgrades w/ a graceful worker shutdown period.