Add a file to the watcher.
(
self,
log_file: LogFile,
callback: Callable[[int, list[int]], None],
error_callback: Callable[[Exception], None],
)
| 75 | self._thread.start() |
| 76 | |
| 77 | def add( |
| 78 | self, |
| 79 | log_file: LogFile, |
| 80 | callback: Callable[[int, list[int]], None], |
| 81 | error_callback: Callable[[Exception], None], |
| 82 | ) -> None: |
| 83 | """Add a file to the watcher.""" |
| 84 | fileno = log_file.fileno |
| 85 | self._file_descriptors[fileno] = WatchedFile(log_file, callback, error_callback) |
| 86 | |
| 87 | @abstractmethod |
| 88 | def run(self) -> None: |
no test coverage detected