From cd7b0b3d40a5a340d5b47819f94a21c9faf23120 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 5 Sep 2012 14:36:15 -0400 Subject: added server-side client metadata object caching --- src/lib/Bcfg2/Server/FileMonitor/Inotify.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Server/FileMonitor/Inotify.py') diff --git a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py index 097fc0b42..a20dc4ad5 100644 --- a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py +++ b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py @@ -27,14 +27,13 @@ class Inotify(Pseudo, pyinotify.ProcessEvent): # these are created in start() after the server is done forking self.notifier = None self.wm = None - self.started = False self.add_q = [] def start(self): + Pseudo.start(self) self.wm = pyinotify.WatchManager() self.notifier = pyinotify.ThreadedNotifier(self.wm, self) self.notifier.start() - self.started = True for monitor in self.add_q: self.AddMonitor(*monitor) self.add_q = [] @@ -142,5 +141,7 @@ class Inotify(Pseudo, pyinotify.ProcessEvent): return path def shutdown(self): - if self.started: + Pseudo.shutdown(self) + if self.notifier: self.notifier.stop() + -- cgit v1.2.3-1-g7c22