Skip to content

Commit

Permalink
Added collaborative_document_save_delay trait
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 9, 2022
1 parent 20bfb57 commit 289f5d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jupyterlab/labapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,14 @@ class LabApp(NotebookConfigShimMixin, LabServerApp):
document will be kept in memory forever.""",
)

collaborative_document_save_delay = Int(
1,
allow_none=True,
config=True,
help="""The delay in seconds to wait after a change is made to a document before saving it
(relevant only in collaborative mode). Defaults to 1s, if None then the document will never be saved.""",
)

collaborative_ystore_class = Type(
default_value=JupyterSQLiteYStore,
klass=BaseYStore,
Expand Down Expand Up @@ -816,6 +824,7 @@ def initialize_handlers(self):
"page_config_data": page_config,
"collaborative_file_poll_interval": self.collaborative_file_poll_interval,
"collaborative_document_cleanup_delay": self.collaborative_document_cleanup_delay,
"collaborative_document_save_delay": self.collaborative_document_save_delay,
"collaborative_ystore_class": self.collaborative_ystore_class,
}
)
Expand Down

0 comments on commit 289f5d3

Please sign in to comment.