1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

Fixed #27685 -- Added watchman support to the autoreloader.

Removed support for pyinotify (refs #9722).
This commit is contained in:
Tom Forbes
2019-01-14 01:33:47 +00:00
committed by Tim Graham
parent a02a6fd580
commit c8720e7696
15 changed files with 1229 additions and 465 deletions

View File

@@ -42,6 +42,8 @@ class Apps:
# Whether the registry is populated.
self.apps_ready = self.models_ready = self.ready = False
# For the autoreloader.
self.ready_event = threading.Event()
# Lock for thread-safe population.
self._lock = threading.RLock()
@@ -120,6 +122,7 @@ class Apps:
app_config.ready()
self.ready = True
self.ready_event.set()
def check_apps_ready(self):
"""Raise an exception if all apps haven't been imported yet."""