summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.py2
-rw-r--r--watcher.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/app.py b/app.py
index 74d87d8..ebf0d83 100644
--- a/app.py
+++ b/app.py
@@ -21,4 +21,4 @@ if __name__ == "__main__":
http_server = WSGIServer(('', 5000), APP, log=None)
server = spawn(http_server.serve_forever)
- joinall([server, watcher])
+ joinall([watcher, server])
diff --git a/watcher.py b/watcher.py
index 353636a..ffb4a42 100644
--- a/watcher.py
+++ b/watcher.py
@@ -126,6 +126,9 @@ class LibraryWatcher(object):
register(self.stop)
+ while True:
+ self.check_for_events()
+
def stop(self):
"""Remove all the watched paths."""
if self.wdd[self.path] > 0: