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

Method _handle_event

openkb/watcher.py:59–69  ·  view source on GitHub ↗

Add the event's source path to pending if it's a supported file.

(self, event)

Source from the content-addressed store, hash-verified

57 self._callback(paths)
58
59 def _handle_event(self, event) -> None:
60 """Add the event's source path to pending if it's a supported file."""
61 if event.is_directory:
62 return
63 path = Path(event.src_path)
64 # Ignore hidden/dotfiles
65 if path.name.startswith("."):
66 return
67 with self._lock:
68 self._pending.add(str(path))
69 self._schedule_flush()
70
71 def on_created(self, event) -> None:
72 """Handle file creation events."""

Callers 2

on_createdMethod · 0.95
on_modifiedMethod · 0.95

Calls 2

_schedule_flushMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected