MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _schedule_flush

Method _schedule_flush

openkb/watcher.py:41–48  ·  view source on GitHub ↗

Cancel any existing timer and start a fresh debounce timer.

(self)

Source from the content-addressed store, hash-verified

39 self._lock = threading.Lock()
40
41 def _schedule_flush(self) -> None:
42 """Cancel any existing timer and start a fresh debounce timer."""
43 with self._lock:
44 if self._timer is not None:
45 self._timer.cancel()
46 self._timer = threading.Timer(self._debounce_seconds, self._flush)
47 self._timer.daemon = True
48 self._timer.start()
49
50 def _flush(self) -> None:
51 """Call the callback with all collected pending paths, then clear."""

Callers 1

_handle_eventMethod · 0.95

Calls 1

startMethod · 0.80

Tested by

no test coverage detected