Commit d963b10c authored by Martin van Es's avatar Martin van Es
Browse files

WIP

parent 375a67cc
......@@ -123,8 +123,11 @@ class Resource:
class EventProcessor(pyinotify.ProcessEvent):
def __init__(self, server):
self.server = server
def process_IN_CLOSE_WRITE(self, event):
server.process(event.path)
self.server.process(event.path)
class Server:
......@@ -132,7 +135,7 @@ class Server:
def __init__(self):
self.watch_manager = pyinotify.WatchManager()
self.event_notifier = pyinotify.ThreadedNotifier(self.watch_manager, EventProcessor())
self.event_notifier = pyinotify.ThreadedNotifier(self.watch_manager, EventProcessor(self))
self.event_notifier.start()
def add_watch(self, domain, location):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment