mirror of https://github.com/zulip/zulip.git
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:
parent
cf82d3316b
commit
be59ef9c02
|
@ -26,7 +26,7 @@ directory=/home/zulip/deployments/current/
|
||||||
|
|
||||||
<% if @tornado_ports.length > 1 -%>
|
<% if @tornado_ports.length > 1 -%>
|
||||||
[program:zulip-tornado]
|
[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
|
process_name=zulip-tornado-port-98%(process_num)02d
|
||||||
environment=PYTHONUNBUFFERED=1,HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
|
environment=PYTHONUNBUFFERED=1,HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
|
||||||
priority=200 ; the relative start priority (default 999)
|
priority=200 ; the relative start priority (default 999)
|
||||||
|
@ -43,7 +43,7 @@ directory=/home/zulip/deployments/current/
|
||||||
numprocs=<%= @tornado_ports.length %>
|
numprocs=<%= @tornado_ports.length %>
|
||||||
<% else -%>
|
<% else -%>
|
||||||
[program:zulip-tornado]
|
[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 %>"
|
environment=PYTHONUNBUFFERED=1,HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
|
||||||
priority=200 ; the relative start priority (default 999)
|
priority=200 ; the relative start priority (default 999)
|
||||||
autostart=true ; start at supervisord start (default: true)
|
autostart=true ; start at supervisord start (default: true)
|
||||||
|
|
|
@ -98,6 +98,7 @@ else:
|
||||||
"./manage.py",
|
"./manage.py",
|
||||||
"runtornado",
|
"runtornado",
|
||||||
"--autoreload",
|
"--autoreload",
|
||||||
|
"--immediate-reloads",
|
||||||
]
|
]
|
||||||
|
|
||||||
manage_args = [f"--settings={settings_module}"]
|
manage_args = [f"--settings={settings_module}"]
|
||||||
|
|
|
@ -41,9 +41,9 @@ class Command(BaseCommand):
|
||||||
def add_arguments(self, parser: CommandParser) -> None:
|
def add_arguments(self, parser: CommandParser) -> None:
|
||||||
parser.add_argument("--autoreload", action="store_true", help="Enable Tornado autoreload")
|
parser.add_argument("--autoreload", action="store_true", help="Enable Tornado autoreload")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--no-immediate-reloads",
|
"--immediate-reloads",
|
||||||
action="store_true",
|
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(
|
parser.add_argument(
|
||||||
"addrport",
|
"addrport",
|
||||||
|
@ -132,7 +132,7 @@ class Command(BaseCommand):
|
||||||
from zerver.tornado.ioloop_logging import logging_data
|
from zerver.tornado.ioloop_logging import logging_data
|
||||||
|
|
||||||
logging_data["port"] = str(port)
|
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)
|
await setup_event_queue(http_server, port, send_reloads)
|
||||||
stack.callback(dump_event_queues, port)
|
stack.callback(dump_event_queues, port)
|
||||||
add_client_gc_hook(missedmessage_hook)
|
add_client_gc_hook(missedmessage_hook)
|
||||||
|
|
Loading…
Reference in New Issue