MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / _debounced_callback

Method _debounced_callback

core/background.py:320–328  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

318 return any(Path(path).match(p) for p in self.patterns)
319
320 def _debounced_callback(self, event):
321 now = time.time()
322 if now - self._last_trigger < self._debounce:
323 return
324 self._last_trigger = now
325 try:
326 self.callback(event.event_type, event.src_path)
327 except Exception as e:
328 error(f"FileWatch: callback error: {e}")
329
330 def on_modified(self, event):
331 if not event.is_directory and self._should_trigger(event.src_path):

Callers 3

on_modifiedMethod · 0.95
on_createdMethod · 0.95
on_deletedMethod · 0.95

Calls 1

errorFunction · 0.90

Tested by

no test coverage detected