(self, sub)
| 586 | raise |
| 587 | |
| 588 | def _check_subscription(self, sub): |
| 589 | subscription = self.client.getSubscription(sub) |
| 590 | if not subscription: |
| 591 | return |
| 592 | logger.debug("Watchman subscription %s has results.", sub) |
| 593 | for result in subscription: |
| 594 | # When using watch-project, it's not simple to get the relative |
| 595 | # directory without storing some specific state. Store the full |
| 596 | # path to the directory in the subscription name, prefixed by its |
| 597 | # type (glob, files). |
| 598 | root_directory = Path(result["subscription"].split(":", 1)[1]) |
| 599 | logger.debug("Found root directory %s", root_directory) |
| 600 | for file in result.get("files", []): |
| 601 | self.notify_file_changed(root_directory / file) |
| 602 | |
| 603 | def request_processed(self, **kwargs): |
| 604 | logger.debug("Request processed. Setting update_watches event.") |
no test coverage detected