restart-server: Start services in opposite order from stop.

`supervisorctl` starts and stops its arguments sequentially, in the
order they are passed[1].  Start them in the opposite order from the
order in which they were stopped -- this puts the dependencies first,
and the most core services (`zulip-django`) last.

While the only "dependency" here is currently thumbor, this sets us up
in case others are added later.

[1] https://github.com/Supervisor/supervisor/blob/master/supervisor/supervisorctl.py#L782
This commit is contained in:
Alex Vandiver 2020-08-07 20:25:59 -07:00 committed by Tim Abbott
parent 8adf530400
commit dc58dec231
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ logging.info("Stopping server core")
subprocess.check_call(["supervisorctl", "stop", *core_server_services])
logging.info("Starting server core")
subprocess.check_call(["supervisorctl", "start", *core_server_services])
subprocess.check_call(["supervisorctl", "start", *reversed(core_server_services)])
logging.info("Starting workers")
subprocess.check_call(["supervisorctl", "start", "zulip-workers:*"])