(self, new, last_tick)
Wait until new_node catches up to old_node.
Wait until new_node catches up to old_node.
Wait until new_node catches up to old_node .
def wait_for_catchup(self, new, last_tick):
        """Wait until new_node catches up to old_node."""
        # wait for it on subscriber
        info = self.load_node_info(new)
        if info.completed_tick >= last_tick:
            self.log.info('tick already exists')
            return info
        if info.paused:
            self.log.info('new node seems paused, resuming')
            self.resume_node(new)
        while 1:
            self.log.debug('waiting for catchup: need=%d, cur=%d', last_tick, info.completed_tick)
            time.sleep(1)
            info = self.load_node_info(new)
            if info.completed_tick >= last_tick:
                return info
def wait_for_catchup ( self , new , last_tick ) : # wait for it on subscriber info = self . load_node_info ( new ) if info . completed_tick >= last_tick : self . log . info ( 'tick already exists' ) return info if info . paused : self . log . info ( 'new node seems paused, resuming' ) self . resume_node ( new ) while 1 : self . log . debug ( 'waiting for catchup: need=%d, cur=%d' , last_tick , info . completed_tick ) time . sleep ( 1 ) info = self . load_node_info ( new ) if info . completed_tick >= last_tick : return info