diff --git a/puppet/zulip/templates/supervisor/zulip.conf.template.erb b/puppet/zulip/templates/supervisor/zulip.conf.template.erb index 683bd17cd5..1b5a00103b 100644 --- a/puppet/zulip/templates/supervisor/zulip.conf.template.erb +++ b/puppet/zulip/templates/supervisor/zulip.conf.template.erb @@ -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) diff --git a/tools/run-dev b/tools/run-dev index 1998b66db6..37e336400e 100755 --- a/tools/run-dev +++ b/tools/run-dev @@ -98,6 +98,7 @@ else: "./manage.py", "runtornado", "--autoreload", + "--immediate-reloads", ] manage_args = [f"--settings={settings_module}"] diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index e1a771675a..81ca7f585b 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -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)