mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00
use asyncio.ensure_future to start coroutines immediately
asyncio has different coroutine start mechanics than tornado tornado starts coroutines immediately, whereas asyncio doesn't until they are scheduled with either ensure_future or waited upon.
This commit is contained in:
@@ -385,7 +385,7 @@ class User:
|
||||
try:
|
||||
# run optional preparation work to bootstrap the notebook
|
||||
await awaitable(spawner.run_pre_spawn_hook())
|
||||
f = spawner.start()
|
||||
f = awaitable(spawner.start())
|
||||
# commit any changes in spawner.start (always commit db changes before yield)
|
||||
db.commit()
|
||||
ip_port = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
|
||||
|
Reference in New Issue
Block a user