-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate YRoom classes to traitlets, fix server extension stopping
#122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
YRoom classes to traitletsYRoom classes to traitlets, fix server extension stopping
|
@Zsailer Thank you for the feedback. I've gone through the logging configurables added by this PR and drastically simplified all of their constructors. Each only takes 1-2 arguments now. 👀 However, I wasn't able to remove every
Even though I had specified I don't think that using |
Zsailer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


Description
Makes
YRoomManagera logging configurable, set by theServerDocsApp.yroom_manager_classtrait.Makes
YRooma logging configurable, set by theYRoomManager.yroom_classtrait.YRoomFileAPI,YRoomEventsAPI, andYjsClientGrouphave all been made logging configurable, set by theYRoom.file_api_class,YRoom.events_api_class, andYRoom.client_group_classtraits respectively.Adds the
YRoomFileAPI.poll_intervalfloat trait, which configures how frequently theYRoomFileAPIwrites unsaved changes to disk, checking for in-band & out-of-band changes before doing so.Fixes a regression introduced by Allow
YRoomto be restarted and allow multi-room kernels #117, where the server extension would not shut down properly.Technical details
#117 refactored the
YRoomtask to make itsstop()method fully synchronous. Each room's content would be saved in a background task. SinceYRoom.stop()&YRoomManager.stop()were made synchronous, theServerDocsApp.stop_extension()method was also made synchronous.However, that change led to a race condition where the
ContentsManagershut down before each room's content was saved to disk. The regression has been fixed by adding aYRoom.until_savedawaitable property that is only awaited when the server shuts down. TheServerDocsApp.stop_extension()method is now asynchronous again.Reviewer guidance