Skip to content

Add configurables to control ystore.db history and cleanup frequency #481

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions projects/jupyter-server-ydoc/jupyter_server_ydoc/stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ class SQLiteYStore(LoggingConfigurable, _SQLiteYStore, metaclass=SQLiteYStoreMet
help="""The document time-to-live in seconds. Defaults to None (document history is never
cleared).""",
)

history_length = Int(
None,
allow_none=True,
config=True,
help="""The maximum age (in seconds) of document history to retain.
Entries older than this window are automatically pruned.
Defaults to None (history is never cleared).""",
)

min_cleanup_interval = Int(
60,
config=True,
help="""Minimum interval in seconds between automatic cleanup operations. Defaults to 60 seconds.""",
)
Loading