mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 07:53:00 +00:00
Replace gen.sleep with asyncio.sleep
This commit is contained in:
@@ -24,7 +24,6 @@ from async_generator import aclosing
|
||||
from async_generator import async_generator
|
||||
from async_generator import asynccontextmanager
|
||||
from async_generator import yield_
|
||||
from tornado import gen
|
||||
from tornado import ioloop
|
||||
from tornado import web
|
||||
from tornado.httpclient import AsyncHTTPClient
|
||||
@@ -175,7 +174,7 @@ async def exponential_backoff(
|
||||
dt = min(max_wait, remaining, random.uniform(0, start_wait * scale))
|
||||
if dt < max_wait:
|
||||
scale *= scale_factor
|
||||
await gen.sleep(dt)
|
||||
await asyncio.sleep(dt)
|
||||
raise TimeoutError(fail_message)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user