def start(self): utils.do_register(self.client) self.poll() self.scheduler.start() try: while True: # Due to the new Background scheduler nature, we need to keep # the main thread alive. time.sleep(1) except (KeyboardInterrupt, SystemExit): # Not strictly necessary if daemonic mode is enabled but # should be done if possible self.scheduler.shutdown(wait=False)
def start(self): utils.do_register(self.client) self.poll() self.scheduler.start()
def test_do_register(self): ret = utils.do_register(self.client, args=None) self.assertEqual(0, ret)