Skip to content

Commit e472a43

Browse files
committed
remove unused _last_save_duration attr
1 parent 3129b70 commit e472a43

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

jupyter_server_documents/rooms/yroom_file_api.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ class YRoomFileAPI(LoggingConfigurable):
126126
dual-writes or dirty-reads.
127127
"""
128128

129-
_last_save_duration: float | None
130-
"""
131-
The duration in seconds of the last save operation. Used to calculate the
132-
adaptive poll interval.
133-
"""
134-
135129
_adaptive_poll_interval: float
136130
"""
137131
The current adaptive poll interval in seconds, calculated based on the last
@@ -164,7 +158,6 @@ def __init__(self, *args, **kwargs):
164158
self._content_lock = asyncio.Lock()
165159

166160
# Initialize adaptive timing attributes
167-
self._last_save_duration = None
168161
self._adaptive_poll_interval = self.poll_interval
169162

170163

@@ -539,9 +532,8 @@ async def save(self, jupyter_ydoc: YBaseDoc):
539532
# JupyterLab tab for this YDoc in the frontend.
540533
jupyter_ydoc.dirty = False
541534

542-
# Calculate save duration and update adaptive poll interval
535+
# Calculate save duration
543536
save_duration = time.perf_counter() - start_time
544-
self._last_save_duration = save_duration
545537

546538
# Calculate new adaptive interval
547539
old_interval = self._adaptive_poll_interval
@@ -611,7 +603,6 @@ def restart(self) -> None:
611603
self._last_path = None
612604

613605
# Reset adaptive timing attributes
614-
self._last_save_duration = None
615606
self._adaptive_poll_interval = self.poll_interval
616607

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

0 commit comments

Comments
 (0)