示例#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)
示例#2
0
文件: syncer.py 项目: jaeko44/agkyra
 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)
示例#3
0
 def wait_sync_threads(self, timeout=None):
     return utils.wait_joins(self.sync_threads, timeout=timeout)
示例#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
示例#5
0
文件: syncer.py 项目: jaeko44/agkyra
 def wait_sync_threads(self, timeout=None):
     return utils.wait_joins(self.sync_threads, timeout=timeout)
示例#6
0
文件: syncer.py 项目: jaeko44/agkyra
 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