From d5ccf183a03a2e76f109073a1f7f08631676669a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 27 Aug 2012 15:53:19 -0400 Subject: [PATCH] cc-4269: added coalesce_events option like in mm1 --- python_apps/media-monitor2/media/monitor/manager.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 31cd3ab09..03b6142c0 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -219,14 +219,13 @@ class Manager(Loggable): self.logger.info("'%s' is not being watched, hence cannot be \ removed" % watch_dir) - def pyinotify(self): - return pyinotify.Notifier(self.wm) - def loop(self): """ block until we receive pyinotify events """ - pyinotify.Notifier(self.wm).loop() + notifier = pyinotify.Notifier(self.wm) + notifier.coalesce_events() + notifier.loop() # Experiments with running notifier in different modes # There are 3 options: normal, async, threaded. #import asyncore