Skip to content

Commit

Permalink
Creates a new FileLoader class to separate the logic of watching files (
Browse files Browse the repository at this point in the history
#121)

* Split code in multiple files

* Uses new rooms with file loader

* Uses the new FileLoader

* Add observer pattern for notifying room

* Fixes watching files and cleaning rooms

* Uses locks to make sure only one client initializes the room

* Clean up before shut down

* Review: room lock private and scoped config variables

* Review: use Logger | None

* Review: save condition, load lock and iterate over subscriptions

* Fix file lock

* Uses file_id instead of paths

* lint

* Ignore type error

* Lint

* Review: Freds comments

* Lint

* Warn users about opening multiple view for the same file

* Adds docstring

* More docstring

* Fixes sync between rooms

* Lint

* Improves sync

* flake

* Revert default settings changes
  • Loading branch information
hbcarlos authored Apr 11, 2023
1 parent eb8456d commit ba6d756
Show file tree
Hide file tree
Showing 8 changed files with 759 additions and 238 deletions.
6 changes: 5 additions & 1 deletion jupyter_collaboration/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from traitlets import Float, Int, Type
from ypy_websocket.ystore import BaseYStore

from .handlers import DocSessionHandler, SQLiteYStore, YDocWebSocketHandler
from .handlers import DocSessionHandler, YDocWebSocketHandler
from .stores import SQLiteYStore


class YDocExtension(ExtensionApp):
Expand Down Expand Up @@ -61,3 +62,6 @@ def initialize_handlers(self):
(r"/api/collaboration/session/(.*)", DocSessionHandler),
]
)

async def stop_extension(self):
YDocWebSocketHandler.clean_up()
Loading

0 comments on commit ba6d756

Please sign in to comment.