MCPcopy
hub / github.com/django/django / run

Method run

django/utils/autoreload.py:345–361  ·  view source on GitHub ↗
(self, django_main_thread)

Source from the content-addressed store, hash-verified

343 return False
344
345 def run(self, django_main_thread):
346 global _url_module_exception
347 logger.debug("Waiting for apps ready_event.")
348 self.wait_for_apps_ready(apps, django_main_thread)
349 from django.urls import get_resolver
350
351 # Prevent a race condition where URL modules aren't loaded when the
352 # reloader starts by accessing the urlconf_module property.
353 try:
354 get_resolver().urlconf_module
355 except Exception as e:
356 # Loading the urlconf can result in errors during development.
357 # If this occurs then store the error and continue.
358 _url_module_exception = e
359 logger.debug("Apps ready_event triggered. Sending autoreload_started signal.")
360 autoreload_started.send(sender=self)
361 self.run_loop()
362
363 def run_loop(self):
364 ticker = self.tick()

Callers 3

restart_with_reloaderFunction · 0.45
start_djangoFunction · 0.45
get_git_changesetFunction · 0.45

Calls 5

wait_for_apps_readyMethod · 0.95
run_loopMethod · 0.95
get_resolverFunction · 0.90
debugMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected