Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 def wait_sync_threads(self, timeout=None):
     return utils.wait_joins(self.sync_threads, timeout=timeout)
Esempio n. 4
0
 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
Esempio n. 5
0
 def wait_sync_threads(self, timeout=None):
     return utils.wait_joins(self.sync_threads, timeout=timeout)
Esempio n. 6
0
 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