MCPcopy
hub / github.com/django/django / _check_subscription

Method _check_subscription

django/utils/autoreload.py:588–601  ·  view source on GitHub ↗
(self, sub)

Source from the content-addressed store, hash-verified

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.")

Callers 1

tickMethod · 0.95

Calls 4

notify_file_changedMethod · 0.80
debugMethod · 0.45
splitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected