Skip to content

Commit 9f844ff

Browse files
committedApr 17, 2018
tornado: Fix logging of tornado activity level.
This logging was apparently broken when sorting imports; it's a fairly unique thing in our codebase that this would be a problem. Prevent future regressions by adding this exception explicitly to the isort configuration.
1 parent d340c8d commit 9f844ff

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
 

‎.isort.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ known_third_party = django, ujson, sqlalchemy
66
known_first_party = zerver, zproject, version, confirmation, zilencer, analytics, frontend_tests, scripts, corporate
77
sections = FUTURE, STDLIB, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
88
lines_after_imports = 1
9+
# See the comment related to ioloop_logging for why this is skipped.
10+
skip = zerver/management/commands/runtornado.py

‎zerver/management/commands/runtornado.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@
99
from tornado import ioloop
1010
from tornado.log import app_log
1111

12-
from zerver.lib.debug import interactive_debug_listen
13-
from zerver.tornado.application import create_tornado_application, \
14-
setup_tornado_rabbitmq
15-
from zerver.tornado.event_queue import add_client_gc_hook, \
16-
missedmessage_hook, process_notification, setup_event_queue
1712
# We must call zerver.tornado.ioloop_logging.instrument_tornado_ioloop
1813
# before we import anything else from our project in order for our
1914
# Tornado load logging to work; otherwise we might accidentally import
2015
# zerver.lib.queue (which will instantiate the Tornado ioloop) before
2116
# this.
2217
from zerver.tornado.ioloop_logging import instrument_tornado_ioloop
23-
from zerver.tornado.socket import respond_send_message
2418

2519
settings.RUNNING_INSIDE_TORNADO = True
2620
instrument_tornado_ioloop()
2721

22+
from zerver.lib.debug import interactive_debug_listen
23+
from zerver.tornado.application import create_tornado_application, \
24+
setup_tornado_rabbitmq
25+
from zerver.tornado.event_queue import add_client_gc_hook, \
26+
missedmessage_hook, process_notification, setup_event_queue
27+
from zerver.tornado.socket import respond_send_message
28+
2829
if settings.USING_RABBITMQ:
2930
from zerver.lib.queue import get_queue_client
3031

0 commit comments

Comments
 (0)
Please sign in to comment.