From dc58dec2312b448d003f1bbb64cc5dfa63274126 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 7 Aug 2020 20:25:59 -0700 Subject: [PATCH] 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 --- scripts/restart-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restart-server b/scripts/restart-server index 3bafb4fa59..7d88811aa5 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -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:*"])