mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
requirements: Upgrade to Tornado 6.
Fixes #8913.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 7acb642fa5)
This commit is contained in:
committed by
Tim Abbott
parent
9362158e04
commit
e124464fea
@@ -246,7 +246,7 @@ class ClientDescriptor:
|
||||
heartbeat_event = create_heartbeat_event()
|
||||
self.add_event(heartbeat_event)
|
||||
|
||||
ioloop = tornado.ioloop.IOLoop.instance()
|
||||
ioloop = tornado.ioloop.IOLoop.current()
|
||||
interval = HEARTBEAT_MIN_FREQ_SECS + random.randint(0, 10)
|
||||
if self.client_type_name != "API: heartbeat test":
|
||||
self._timeout_handle = ioloop.call_later(interval, timeout_callback)
|
||||
@@ -265,7 +265,7 @@ class ClientDescriptor:
|
||||
self.current_handler_id = None
|
||||
self.current_client_name = None
|
||||
if self._timeout_handle is not None:
|
||||
ioloop = tornado.ioloop.IOLoop.instance()
|
||||
ioloop = tornado.ioloop.IOLoop.current()
|
||||
ioloop.remove_timeout(self._timeout_handle)
|
||||
self._timeout_handle = None
|
||||
|
||||
@@ -601,8 +601,6 @@ def send_restart_events(immediate: bool = False) -> None:
|
||||
|
||||
|
||||
async def setup_event_queue(server: tornado.httpserver.HTTPServer, port: int) -> None:
|
||||
ioloop = tornado.ioloop.IOLoop.instance()
|
||||
|
||||
if not settings.TEST_SUITE:
|
||||
load_event_queues(port)
|
||||
autoreload.add_reload_hook(lambda: dump_event_queues(port))
|
||||
@@ -613,9 +611,7 @@ async def setup_event_queue(server: tornado.httpserver.HTTPServer, port: int) ->
|
||||
pass
|
||||
|
||||
# Set up event queue garbage collection
|
||||
pc = tornado.ioloop.PeriodicCallback(
|
||||
lambda: gc_event_queues(port), EVENT_QUEUE_GC_FREQ_MSECS, ioloop
|
||||
)
|
||||
pc = tornado.ioloop.PeriodicCallback(lambda: gc_event_queues(port), EVENT_QUEUE_GC_FREQ_MSECS)
|
||||
pc.start()
|
||||
|
||||
send_restart_events(immediate=settings.DEVELOPMENT)
|
||||
|
||||
Reference in New Issue
Block a user