def start(self): """ Sends a ping request to the server in an interval. """ print("[Pinger] Started") thread = RepeatingTimer(self.ping_interval, self.ping) thread.daemon = True thread.start()
def setup(): global timer reactor.callWhenRunning(create_shell_server) reactor.startRunning() timer = RepeatingTimer(0.01, catch_up, daemon=True) timer.start() logging.info("Debug terminal initialized.")
def setup_timer(self, run_immediately=True): if self.buffer_metadata['interval']: self.timer = RepeatingTimer(self.buffer_metadata['interval'], self.update) self.timer.start() if run_immediately: logging.info("%s: performing immediate update in buffer %s" % (self.session, self)) call_threaded(self.update, update_type=self._update_types['initial'])
def setup(): application.update_timer = RepeatingTimer(UPDATE_INTERVAL, check_for_update) application.update_timer.start() call_threaded(check_for_update)