Skip to content
Snippets Groups Projects
Commit d963b10c authored by Martin van Es's avatar Martin van Es
Browse files

WIP

parent 375a67cc
Branches
Tags
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment