summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/FileMonitor/Inotify.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-05 14:36:15 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-05 14:55:33 -0400
commitcd7b0b3d40a5a340d5b47819f94a21c9faf23120 (patch)
tree67dc3b8f53b0921aade0ba5603d5f1c9cff85eb5 /src/lib/Bcfg2/Server/FileMonitor/Inotify.py
parent84e8fc36c4d8524c8094daf31955dce8c0a624ea (diff)
downloadbcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.tar.gz
bcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.tar.bz2
bcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.zip
added server-side client metadata object caching
Diffstat (limited to 'src/lib/Bcfg2/Server/FileMonitor/Inotify.py')
-rw-r--r--src/lib/Bcfg2/Server/FileMonitor/Inotify.py7
1 files changed, 4 insertions, 3 deletions
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()
+