mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Install the AsyncIOMainLoop instead of configuring it.
Installing the loop instructs the tornado loop to point to the ayncio loop and use that. IOLoop.configure told the tornado loop to create a new ioloop when a loop was needed, which is not what we want.
This commit is contained in:
@@ -31,6 +31,8 @@ from tornado.ioloop import IOLoop, PeriodicCallback
|
|||||||
from tornado.log import app_log, access_log, gen_log
|
from tornado.log import app_log, access_log, gen_log
|
||||||
import tornado.options
|
import tornado.options
|
||||||
from tornado import gen, web
|
from tornado import gen, web
|
||||||
|
from tornado.platform.asyncio import AsyncIOMainLoop
|
||||||
|
AsyncIOMainLoop().install()
|
||||||
|
|
||||||
from traitlets import (
|
from traitlets import (
|
||||||
Unicode, Integer, Dict, TraitError, List, Bool, Any,
|
Unicode, Integer, Dict, TraitError, List, Bool, Any,
|
||||||
@@ -1629,7 +1631,6 @@ class JupyterHub(Application):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def launch_instance(cls, argv=None):
|
def launch_instance(cls, argv=None):
|
||||||
self = cls.instance()
|
self = cls.instance()
|
||||||
IOLoop.configure('tornado.platform.asyncio.AsyncIOLoop')
|
|
||||||
loop = IOLoop.current()
|
loop = IOLoop.current()
|
||||||
loop.add_callback(self.launch_instance_async, argv)
|
loop.add_callback(self.launch_instance_async, argv)
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user