runtornado: Swap deferred reload events to the default.

This makes no immediate reloads the default for runtornado, matching
the production configuration, and changes the development incantation
to be the one to specify the departure from the norm, with
--immediate-reloads.
This commit is contained in:
Alex Vandiver 2024-02-27 04:04:29 +00:00 committed by Tim Abbott
parent cf82d3316b
commit be59ef9c02
3 changed files with 6 additions and 5 deletions

View File

@ -26,7 +26,7 @@ directory=/home/zulip/deployments/current/
<% if @tornado_ports.length > 1 -%>
[program:zulip-tornado]
command=/home/zulip/deployments/current/manage.py runtornado 127.0.0.1:98%(process_num)02d --no-immediate-reloads
command=/home/zulip/deployments/current/manage.py runtornado 127.0.0.1:98%(process_num)02d
process_name=zulip-tornado-port-98%(process_num)02d
environment=PYTHONUNBUFFERED=1,HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
priority=200 ; the relative start priority (default 999)
@ -43,7 +43,7 @@ directory=/home/zulip/deployments/current/
numprocs=<%= @tornado_ports.length %>
<% else -%>
[program:zulip-tornado]
command=/home/zulip/deployments/current/manage.py runtornado 127.0.0.1:9800 --no-immediate-reloads
command=/home/zulip/deployments/current/manage.py runtornado 127.0.0.1:9800
environment=PYTHONUNBUFFERED=1,HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
priority=200 ; the relative start priority (default 999)
autostart=true ; start at supervisord start (default: true)

View File

@ -98,6 +98,7 @@ else:
"./manage.py",
"runtornado",
"--autoreload",
"--immediate-reloads",
]
manage_args = [f"--settings={settings_module}"]

View File

@ -41,9 +41,9 @@ class Command(BaseCommand):
def add_arguments(self, parser: CommandParser) -> None:
parser.add_argument("--autoreload", action="store_true", help="Enable Tornado autoreload")
parser.add_argument(
"--no-immediate-reloads",
"--immediate-reloads",
action="store_true",
help="Do not tell old web app clients to immediately reload.",
help="Tell web app clients to immediately reload after Tornado starts",
)
parser.add_argument(
"addrport",
@ -132,7 +132,7 @@ class Command(BaseCommand):
from zerver.tornado.ioloop_logging import logging_data
logging_data["port"] = str(port)
send_reloads = not options.get("no_immediate_reloads", False)
send_reloads = options.get("immediate_reloads", False)
await setup_event_queue(http_server, port, send_reloads)
stack.callback(dump_event_queues, port)
add_client_gc_hook(missedmessage_hook)