Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Oct 12, 2023
1 parent 6e75c81 commit 3ae1368
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions jupyter_collaboration/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ def initialize_handlers(self):
# We are temporarily initializing the store here because the
# initialization is async
self.store = self.ystore_class(log=self.log)
loop = asyncio.get_event_loop()
loop.run_until_complete(self.store.initialize())

try:
loop = asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

task = loop.create_task(self.store.initialize())
if not loop.is_running():
loop.run_until_complete(task)

# self.settings is local to the ExtensionApp but here we need
# the global app settings in which the file id manager will register
Expand Down
1 change: 1 addition & 0 deletions jupyter_collaboration/stores/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


class YDocNotFound(Exception):
pass

Expand Down

0 comments on commit 3ae1368

Please sign in to comment.