restart-server: Wait until chain reload has completed.

We should not proceed and send client reload events until we know that
all of the server processes have updated to the latest version, or
they may reload into the old server version if they hit a Django
worker which has not yet restarted.

Because the logic controlling the number of workers is mildly complex,
and lives in Puppet, use the `uwsgi` Python bindings to know when the
process being reloaded is the last one, and use that to write out a
file signifying the success of the chain reload.  `restart-server`
awaits the creation of this file before proceeding.
This commit is contained in:
Alex Vandiver
2024-08-28 01:57:32 +00:00
committed by Tim Abbott
parent 3efc5ae1fd
commit 674ca1a95d
3 changed files with 34 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ module = [
"tlds.*",
"twitter.*",
"two_factor.*",
"uwsgi",
]
ignore_missing_imports = true