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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user