def stop_notifiers(self, timeout=None): for notifier in self.notifiers.values(): try: notifier.stop() except KeyError as e: # bypass watchdog inotify bug that causes a KeyError # when attempting to stop a notifier after the watched # directory has been deleted logger.warning("Ignored KeyError: %s" % e) except TypeError as e: # bypass watchdog osx bug that causes a TypeError # when attempting to stop a notifier after the watched # directory has been deleted logger.warning("Ignored TypeError: %s" % e) return utils.wait_joins(self.notifiers.values(), timeout)
def wait_sync_threads(self, timeout=None): return utils.wait_joins(self.sync_threads, timeout=timeout)
def stop_decide(self, timeout=None): if self.decide_active: self.decide_thread.stop() logger.info("Stopped syncing") return utils.wait_joins([self.decide_thread], timeout) return timeout