From c9bb2c16cce42113f2fd16bb70badcbede48e7e1 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 3 Aug 2021 23:14:03 -0700 Subject: [PATCH] restart-server: Add a --skip-tornado. Tornado restarts are the most user-visible; provide a means to restart everything but them, for changes which are known to not affect Tornado. --- scripts/restart-server | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/restart-server b/scripts/restart-server index 0e3fa0313a..c319926fea 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -38,6 +38,11 @@ if action == "restart": action="store_true", help="Restart with more concern for expediency than minimizing availability interruption", ) + parser.add_argument( + "--skip-tornado", + action="store_true", + help="Do not restart Tornado processes", + ) args = parser.parse_args() deploy_path = os.path.realpath(os.path.join(os.path.dirname(__file__), "..")) @@ -118,7 +123,9 @@ if has_application_server(): # main source of user-visible downtime when we restart a Zulip server. # We do this before restarting Django, in case there are new event # types which it will need to know how to deal with. - if len(tornado_ports) > 1: + if action == "restart" and args.skip_tornado: + logging.info("Skipping restart of Tornado") + elif len(tornado_ports) > 1: for p in tornado_ports: # Restart Tornado processes individually for a better rate of # restarts. This also avoids behavior with restarting a whole