Skip to content

Instantly share code, notes, and snippets.

@loic loic/foo.diff
Created Dec 2, 2013

Embed
What would you like to do?
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index 3c71fa2..063b9f2 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -185,6 +185,7 @@ def kqueue_code_changed():
kqueue.control([make_kevent(watcher)], 0)
def update_watch(sender=None, **kwargs):
+ print("update_watch")
watcher.write(b'.')
request_finished.connect(update_watch)
@@ -194,6 +195,7 @@ def kqueue_code_changed():
filenames = set()
descriptors = set()
+ print("kqueue_code_changed")
while True:
old_filenames = filenames
filenames = set(gen_filenames())
@@ -231,6 +233,7 @@ def kqueue_code_changed():
kqueue.control([make_kevent(descriptor) for descriptor in new_descriptors], 0)
events = kqueue.control([], 1)
+ print("request_finished")
# After a request, reload the set of watched files.
if len(events) == 1 and events[0].ident == watcher.fileno():
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.