From: Diane Trout Date: Tue, 15 Jan 2008 23:46:04 +0000 (+0000) Subject: pyinotify rm_watch takes a list, not a dictionary. X-Git-Tag: 0.1.0~9 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=782e0b3adbfe9b29b9367502eb0f3d8f5663c1e4 pyinotify rm_watch takes a list, not a dictionary. --- diff --git a/gaworkflow/automation/spoolwatcher.py b/gaworkflow/automation/spoolwatcher.py index ba566cb..1be91c8 100644 --- a/gaworkflow/automation/spoolwatcher.py +++ b/gaworkflow/automation/spoolwatcher.py @@ -11,6 +11,16 @@ from pyinotify import EventsCodes from benderjab import rpc +class WatcherEvents(object): + # two events need to be tracked + # one to send startCopy + # one to send OMG its broken + # OMG its broken needs to stop when we've seen enough + # cycles + # this should be per runfolder. + # read the xml files + def __init__(self): + class Handler(pyinotify.ProcessEvent): def __init__(self, watchmanager, bot): @@ -112,7 +122,7 @@ class SpoolWatcher(rpc.XmlRpcBot): if self.wdd is not None: logging.debug("disabling watch") logging.debug(str(self.wdd)) - self.wm.rm_watch(self.wdd) + self.wm.rm_watch(self.wdd.values()) self.wdd = None def process_notify(self, *args):