def work(self): while True: timeout = self.timeout if idle.is_set(): timeout = self.idle_timeout fetch.wait(timeout) if shutting_down.is_set(): log.info("Stop fetch worker") break self.fetch()
def work(self): while True: timeout = self.timeout if idle.is_set(): timeout = self.idle_timeout log.debug("Wait for {}".format(timeout)) fetch.wait(timeout) if shutting_down.is_set(): log.info("Stop fetch worker") break self.fetch()