From: Diane Trout Date: Mon, 1 Jun 2009 17:57:12 +0000 (+0000) Subject: Consistently use 'watchdir' instead of 'watch_dir' now. X-Git-Tag: 0.2.0.5~4 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=68f0e12cb70fbc3bd56ebc53bc8494b508ba4e2b Consistently use 'watchdir' instead of 'watch_dir' now. --- diff --git a/htsworkflow/automation/spoolwatcher.py b/htsworkflow/automation/spoolwatcher.py index d100879..d57ab59 100644 --- a/htsworkflow/automation/spoolwatcher.py +++ b/htsworkflow/automation/spoolwatcher.py @@ -158,7 +158,7 @@ class SpoolWatcher(rpc.XmlRpcBot): def add_watch(self, watchdirs=None): """ - start watching watchdir or self.watch_dir + start watching watchdir or self.watchdir we're currently limited to watching one directory tree. """ # the one tree limit is mostly because self.wdd is a single item @@ -200,13 +200,13 @@ class SpoolWatcher(rpc.XmlRpcBot): self.notifier.read_events() # should we do something? # has something happened? - for watch_dir, last_events in self.handler.last_event.items(): - logging.debug('last_events: %s %s' % (watch_dir, last_events)) + for watchdir, last_events in self.handler.last_event.items(): + logging.debug('last_events: %s %s' % (watchdir, last_events)) for last_event_dir, last_event_time in last_events.items(): time_delta = time.time() - last_event_time if time_delta > self.write_timeout: - self.startCopy(watch_dir, last_event_dir) - self.handler.last_event[watch_dir] = {} + self.startCopy(watchdir, last_event_dir) + self.handler.last_event[watchdir] = {} # handle unmounted filesystems for mount_point, was_mounted in self.mounted_points.items(): if not was_mounted and mount.is_mounted(mount_point): @@ -267,7 +267,7 @@ class SpoolWatcher(rpc.XmlRpcBot): self.send(u, 'startCopy %s %s' % (watchdir, event_path)) def sequencingFinished(self, run_dir): - # need to strip off self.watch_dir from rundir I suspect. + # need to strip off self.watchdirs from rundir I suspect. logging.info("run.completed in " + str(run_dir)) pattern = self.watch_dir if pattern[-1] != os.path.sep: