qcodes/data/data_set.py
def complete(self, delay=1.5):
        """
        Periodically sync the DataSet and display percent complete status.

        Also, each period, execute functions stored in (class attribute)
        ``self.background_functions``. If a function fails, we log its
        traceback and continue on. If any one function fails twice in
        a row, it gets removed.

        Args:
            delay (float): seconds between iterations. Default 1.5
        """
        log.info(
            f'waiting for DataSet <{self.location}> to complete')

        failing = {key: False for key in self.background_functions}

        completed = False
        while True:
            log.info('DataSet: {:.0f}% complete'.format(
                self.fraction_complete() * 100))

            # first check if we're done
            if self.sync() is False:
                completed = True

            # then even if we *are* done, execute the background functions
            # because we want things like live plotting to get the final data
            for key, fn in list(self.background_functions.items()):
                try:
                    log.debug(f"calling {key}: {repr(fn)}")
                    fn()
                    failing[key] = False
                except Exception:
                    log.info(format_exc())
                    if failing[key]:
                        log.warning(
                            'background function {} failed twice in a row, '
                            'removing it'.format(key))
                        del self.background_functions[key]
                    failing[key] = True

            if completed:
                break

            # but only sleep if we're not already finished
            time.sleep(delay)

        log.info(f'DataSet <{self.location}> is complete')

        Periodically sync the DataSet and display percent complete status.

        Also, each period, execute functions stored in (class attribute)
        ``self.background_functions``. If a function fails, we log its
        traceback and continue on. If any one function fails twice in
        a row, it gets removed.

        Args:
            delay (float): seconds between iterations. Default 1.5
        
Periodically sync the DataSet and display percent complete status.
Also, each period, execute functions stored in (class attribute)
``self.background_functions``. If a function fails, we log its
traceback and continue on. If any one function fails twice in
a row, it gets removed.
Periodically sync the DataSet and display percent complete status . Also each period execute functions stored in ( class attribute ) ` ` self . background_functions ` ` . If a function fails we log its traceback and continue on . If any one function fails twice in a row it gets removed .
def complete(self, delay=1.5):
        log.info(
            f'waiting for DataSet <{self.location}> to complete')
        failing = {key: False for key in self.background_functions}
        completed = False
        while True:
            log.info('DataSet: {:.0f}% complete'.format(
                self.fraction_complete() * 100))
            if self.sync() is False:
                completed = True
            for key, fn in list(self.background_functions.items()):
                try:
                    log.debug(f"calling {key}: {repr(fn)}")
                    fn()
                    failing[key] = False
                except Exception:
                    log.info(format_exc())
                    if failing[key]:
                        log.warning(
                            'background function {} failed twice in a row, '
                            'removing it'.format(key))
                        del self.background_functions[key]
                    failing[key] = True
            if completed:
                break
            time.sleep(delay)
        log.info(f'DataSet <{self.location}> is complete')
def complete ( self , delay = 1.5 ) : log . info ( f'waiting for DataSet <{self.location}> to complete' ) failing = { key : False for key in self . background_functions } completed = False while True : log . info ( 'DataSet: {:.0f}% complete' . format ( self . fraction_complete ( ) * 100 ) ) if self . sync ( ) is False : completed = True for key , fn in list ( self . background_functions . items ( ) ) : try : log . debug ( f"calling {key}: {repr(fn)}" ) fn ( ) failing [ key ] = False except Exception : log . info ( format_exc ( ) ) if failing [ key ] : log . warning ( 'background function {} failed twice in a row, ' 'removing it' . format ( key ) ) del self . background_functions [ key ] failing [ key ] = True if completed : break time . sleep ( delay ) log . info ( f'DataSet <{self.location}> is complete' )
Periodically sync the DataSet and display percent complete status.
Periodically sync the DataSet and display percent complete status .
"""
        Periodically sync the DataSet and display percent complete status.

        Also, each period, execute functions stored in (class attribute)
        ``self.background_functions``. If a function fails, we log its
        traceback and continue on. If any one function fails twice in
        a row, it gets removed.

        Args:
            delay (float): seconds between iterations. Default 1.5
        """ # first check if we're done # then even if we *are* done, execute the background functions # because we want things like live plotting to get the final data # but only sleep if we're not already finished
self
delay
seconds between iterations. Default 1.5
seconds between iterations . Default 1 . 5