Permalink
Browse files

fixes

  • Loading branch information...
1 parent 3b39cb0 commit 54015c534e1d6eb1b94cb884682b999e6cde0f3f Andrew committed May 7, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 slurp
  2. +1 −1 slurp.py
View
@@ -93,10 +93,10 @@ class Manager():
logger.info('terminating')
raise self.Terminate()
- def loop(self):
+ def loop(self, paths):
while True:
try:
- slurp.monitor(paths, mgr.conf)
+ slurp.monitor(paths, self.conf)
except Manager.Reload:
continue
except Manager.Terminate:
@@ -192,7 +192,7 @@ def main():
if opts.enable_syslog:
configure_syslog()
try:
- manager.loop()
+ mgr.loop()
except Exception, ex:
logger.exception(ex)
raise
View
@@ -773,13 +773,13 @@ def monitor(paths, conf, callback=None):
"""
mask = pyinotify.ALL_EVENTS
wm = pyinotify.WatchManager()
+ notifier = pyinotify.Notifier(wm, default_proc_fun=MonitorEvent(conf))
for path in paths:
path = path.strip()
wm.add_watch(path, mask, rec=True, auto_add=True)
logger.info('monitoring %s', path)
seed([path], conf) # TODO: allow disable?
eat([path], conf) # TODO: allow disable?
- notifier = pyinotify.Notifier(wm, default_proc_fun=MonitorEvent(conf))
logger.info('enter notification loop')
notifier.loop(callback=callback)
logger.info('exit notification loop')

0 comments on commit 54015c5

Please sign in to comment.