From 21f08265dedac8917ba819f5223683895cb58910 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 15 Oct 2025 01:44:23 +0000 Subject: [PATCH] restart-server: --tornado-reshard implies --skip-client-reloads. The flags are marked mutually exclusive, so don't pass both; have the former imply the latter. --- scripts/refresh-sharding-and-restart | 2 +- scripts/restart-server | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/refresh-sharding-and-restart b/scripts/refresh-sharding-and-restart index 4d29c706a7..bb82f769be 100755 --- a/scripts/refresh-sharding-and-restart +++ b/scripts/refresh-sharding-and-restart @@ -25,5 +25,5 @@ fi # clients getting into reload loops ending in crashing on 500 response # while Django is restarting. For this reason it's important to # reload nginx only after Django and Tornado. -"$(dirname "$0")/restart-server" --skip-client-reloads --tornado-reshard +"$(dirname "$0")/restart-server" --tornado-reshard service nginx reload diff --git a/scripts/restart-server b/scripts/restart-server index f36dce046b..f65f10c572 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -303,7 +303,12 @@ if (action == "start" or args.less_graceful) and not args.only_django: logging.info("Starting workers") subprocess.check_call(["supervisorctl", "start", *workers]) -if has_application_server() and not args.skip_client_reloads and not args.only_django: +if ( + has_application_server() + and not args.skip_client_reloads + and not args.only_django + and not args.tornado_reshard +): # All of the servers have been (re)started; now enqueue events in # the Tornado servers to tell clients to reload. logging.info("Sending reload events to clients in the background")