Skip to content

Commit ebc2b70

Browse files
committed
feat: add history_length and min_cleanup_interval configurables for ystore cleanup control
1 parent 9059310 commit ebc2b70

File tree

1 file changed

+15
-0
lines changed
  • projects/jupyter-server-ydoc/jupyter_server_ydoc

1 file changed

+15
-0
lines changed

projects/jupyter-server-ydoc/jupyter_server_ydoc/stores.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ class SQLiteYStore(LoggingConfigurable, _SQLiteYStore, metaclass=SQLiteYStoreMet
3030
help="""The document time-to-live in seconds. Defaults to None (document history is never
3131
cleared).""",
3232
)
33+
34+
history_length = Int(
35+
None,
36+
allow_none=True,
37+
config=True,
38+
help="""The maximum age (in seconds) of document history to retain.
39+
Entries older than this window are automatically pruned.
40+
Defaults to None (history is never cleared).""",
41+
)
42+
43+
min_cleanup_interval = Int(
44+
60,
45+
config=True,
46+
help="""Minimum interval in seconds between automatic cleanup operations. Defaults to 60 seconds.""",
47+
)

0 commit comments

Comments
 (0)