Skip to content

Commit 2c6b0c7

Browse files
authored
Support async content manager
Support async content_manager such as AsyncLargeFileManager to prevent jupyter stucking on listing folders: https://jupyter-server.readthedocs.io/en/latest/developers/contents.html#asynchronous-support
1 parent da39b76 commit 2c6b0c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

voila/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ async def _jinja_cell_generator(self, nb, kernel_id):
242242
yield output_cell
243243

244244
async def load_notebook(self, path):
245-
model = self.contents_manager.get(path=path)
245+
model = await ensure_async(self.contents_manager.get(path=path))
246246
if 'content' not in model:
247247
raise tornado.web.HTTPError(404, 'file not found')
248248
__, extension = os.path.splitext(model.get('path', ''))

0 commit comments

Comments
 (0)