requirements: Upgrade to Tornado 6.

Fixes #8913.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-03-17 13:42:25 -07:00
committed by Alex Vandiver
parent f23bfe91c0
commit 7acb642fa5
11 changed files with 115 additions and 68 deletions

View File

@@ -10,7 +10,7 @@ from asgiref.sync import async_to_sync, sync_to_async
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError, CommandParser
from tornado import autoreload
from tornado.platform.asyncio import AsyncIOMainLoop, to_asyncio_future
from tornado.platform.asyncio import AsyncIOMainLoop
settings.RUNNING_INSIDE_TORNADO = True
@@ -111,9 +111,7 @@ class Command(BaseCommand):
# start tornado web server in single-threaded mode
http_server = httpserver.HTTPServer(application, xheaders=True)
stack.push_async_callback(
lambda: to_asyncio_future(http_server.close_all_connections())
)
stack.push_async_callback(http_server.close_all_connections)
stack.callback(http_server.stop)
http_server.listen(port, address=addr)