Skip to content

Commit 574e101

Browse files
authored
Use ensure_async function (#54)
1 parent 8762730 commit 574e101

File tree

1 file changed

+2
-2
lines changed
  • jupyter_server_terminals

1 file changed

+2
-2
lines changed

jupyter_server_terminals/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
try:
1212
from jupyter_server.extension.application import ExtensionApp
1313
from jupyter_server.transutils import trans
14-
from jupyter_server.utils import run_sync_in_loop
14+
from jupyter_server.utils import ensure_async
1515
except ModuleNotFoundError:
1616
raise ModuleNotFoundError("Jupyter Server must be installed to use this extension.")
1717

@@ -101,7 +101,7 @@ async def cleanup_terminals(self):
101101
"Shutting down %d terminal", "Shutting down %d terminals", n_terminals
102102
)
103103
self.log.info(terminal_msg % n_terminals)
104-
await run_sync_in_loop(terminal_manager.terminate_all())
104+
await ensure_async(terminal_manager.terminate_all())
105105

106106
async def stop_extension(self):
107107
await self.cleanup_terminals()

0 commit comments

Comments
 (0)