From 5ae6f4f0dd75cb89c38548023b0c91b4093cb7e7 Mon Sep 17 00:00:00 2001 From: Mateusz Mandera Date: Tue, 24 Mar 2020 12:48:41 +0100 Subject: [PATCH] tornado: Put port in logging_data before setup_event_queue in runtornado. setup_event_queue() generates some logs about loaded event queues, and it's good for the logging system to have access to the port at that point already. --- zerver/management/commands/runtornado.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index ca885db6b0..e54b1141b5 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -104,11 +104,11 @@ class Command(BaseCommand): no_keep_alive=no_keep_alive) http_server.listen(int(port), address=addr) + from zerver.tornado.ioloop_logging import logging_data + logging_data['port'] = port setup_event_queue(int(port)) add_client_gc_hook(missedmessage_hook) setup_tornado_rabbitmq() - from zerver.tornado.ioloop_logging import logging_data - logging_data['port'] = port instance = ioloop.IOLoop.instance()