luminoso_api/v5_client.py
def wait_for_build(self, interval=5, path=None):
        """
        A convenience method designed to inform you when a project build has
        completed.  It polls the API every `interval` seconds until there is
        not a build running.  At that point, it returns the "last_build_info"
        field of the project record if the build succeeded, and raises a
        LuminosoError with the field as its message if the build failed.

        If a `path` is not specified, this method will assume that its URL is
        the URL for the project.  Otherwise, it will use the specified path
        (which should be "/projects/<project_id>/").
        """
        path = path or ''
        start = time.time()
        next_log = 0
        while True:
            response = self.get(path)['last_build_info']
            if not response:
                raise ValueError('This project is not building!')
            if response['stop_time']:
                if response['success']:
                    return response
                else:
                    raise LuminosoError(response)
            elapsed = time.time() - start
            if elapsed > next_log:
                logger.info('Still waiting (%d seconds elapsed).', next_log)
                next_log += 120
            time.sleep(interval)
def wait_for_build(self, interval=5, path=None):
        path = path or ''
        start = time.time()
        next_log = 0
        while True:
            response = self.get(path)['last_build_info']
            if not response:
                raise ValueError('This project is not building!')
            if response['stop_time']:
                if response['success']:
                    return response
                else:
                    raise LuminosoError(response)
            elapsed = time.time() - start
            if elapsed > next_log:
                logger.info('Still waiting (%d seconds elapsed).', next_log)
                next_log += 120
            time.sleep(interval)
def wait_for_build ( self , interval = 5 , path = None ) : path = path or '' start = time . time ( ) next_log = 0 while True : response = self . get ( path ) [ 'last_build_info' ] if not response : raise ValueError ( 'This project is not building!' ) if response [ 'stop_time' ] : if response [ 'success' ] : return response else : raise LuminosoError ( response ) elapsed = time . time ( ) - start if elapsed > next_log : logger . info ( 'Still waiting (%d seconds elapsed).' , next_log ) next_log += 120 time . sleep ( interval )
A convenience method designed to inform you when a project build has
        completed.  It polls the API every `interval` seconds until there is
        not a build running.  At that point, it returns the "last_build_info"
        field of the project record if the build succeeded, and raises a
        LuminosoError with the field as its message if the build failed.

        If a `path` is not specified, this method will assume that its URL is
        the URL for the project.  Otherwise, it will use the specified path
        (which should be "/projects/<project_id>/").
A convenience method designed to inform you when a project build has completed . It polls the API every interval seconds until there is not a build running . At that point it returns the last_build_info field of the project record if the build succeeded and raises a LuminosoError with the field as its message if the build failed .