Skip to content

Commit 7e045b9

Browse files
committed
remove poll_interval trait, init with min_poll_interval
1 parent e472a43 commit 7e045b9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

jupyter_server_documents/rooms/yroom_file_api.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ class YRoomFileAPI(LoggingConfigurable):
4545
file_id: The unique identifier for this file.
4646
"""
4747

48-
poll_interval = Float(
49-
default_value=0.5,
50-
help="Sets the initial interval for saving the YDoc & checking the file "
51-
"for changes. This serves as the starting value before adaptive timing "
52-
"takes effect. Defaults to 0.5 seconds.",
53-
config=True,
54-
)
55-
5648
min_poll_interval = Float(
5749
default_value=0.5,
5850
help="Minimum autosave interval in seconds. The adaptive timing will "
@@ -158,7 +150,7 @@ def __init__(self, *args, **kwargs):
158150
self._content_lock = asyncio.Lock()
159151

160152
# Initialize adaptive timing attributes
161-
self._adaptive_poll_interval = self.poll_interval
153+
self._adaptive_poll_interval = self.min_poll_interval
162154

163155

164156
def get_path(self) -> str | None:
@@ -603,7 +595,7 @@ def restart(self) -> None:
603595
self._last_path = None
604596

605597
# Reset adaptive timing attributes
606-
self._adaptive_poll_interval = self.poll_interval
598+
self._adaptive_poll_interval = self.min_poll_interval
607599

608600
self.log.info(f"Restarted FileAPI for room '{self.room_id}'.")
609601

0 commit comments

Comments
 (0)