(self)
| 337 | |
| 338 | @overrides(PyDBDaemonThread._on_run) |
| 339 | def _on_run(self): |
| 340 | try: |
| 341 | pydev_log.info("Watching directories for code reload:\n---\n%s\n---" % ("\n".join(sorted(self.watch_dirs)))) |
| 342 | |
| 343 | # i.e.: The first call to set_tracked_paths will do a full scan, so, do it in the thread |
| 344 | # too (after everything is configured). |
| 345 | self.watcher.set_tracked_paths(self.watch_dirs) |
| 346 | while not self._kill_received: |
| 347 | for change_enum, change_path in self.watcher.iter_changes(): |
| 348 | # We're only interested in modified events |
| 349 | if change_enum == fsnotify.Change.modified: |
| 350 | pydev_log.info("Modified: %s", change_path) |
| 351 | self.api.request_reload_code(self.py_db, -1, None, change_path) |
| 352 | else: |
| 353 | pydev_log.info("Ignored (add or remove) change in: %s", change_path) |
| 354 | except: |
| 355 | pydev_log.exception("Error when waiting for filesystem changes in FSNotifyThread.") |
| 356 | |
| 357 | @overrides(PyDBDaemonThread.do_kill_pydev_thread) |
| 358 | def do_kill_pydev_thread(self): |
nothing calls this directly
no test coverage detected