nbgwas_rest/__init__.py
def wait_for_task(uuidstr, hintlist=None):
    """
    Waits for task to appear in done directory
    :param uuidstr: uuid of task
    :param hintlist: list of ip addresses to search under
    :return: string containing full path to task or None if not found
    """
    if uuidstr is None:
        app.logger.error('uuid is None')
        return None

    counter = 0
    taskpath = None
    done_dir = get_done_dir()
    while counter < app.config[WAIT_COUNT_KEY]:
        taskpath = get_task(uuidstr, iphintlist=hintlist,
                            basedir=done_dir)
        if taskpath is not None:
            break
        app.logger.debug('Sleeping while waiting for ' + uuidstr)
        time.sleep(app.config[SLEEP_TIME_KEY])
        counter = counter + 1

    if taskpath is None:
        app.logger.info('Wait time exceeded while looking for: ' + uuidstr)

    return taskpath

    Waits for task to appear in done directory
    :param uuidstr: uuid of task
    :param hintlist: list of ip addresses to search under
    :return: string containing full path to task or None if not found
    
Waits for task to appear in done directory
Waits for task to appear in done directory
def wait_for_task(uuidstr, hintlist=None):
    if uuidstr is None:
        app.logger.error('uuid is None')
        return None
    counter = 0
    taskpath = None
    done_dir = get_done_dir()
    while counter < app.config[WAIT_COUNT_KEY]:
        taskpath = get_task(uuidstr, iphintlist=hintlist,
                            basedir=done_dir)
        if taskpath is not None:
            break
        app.logger.debug('Sleeping while waiting for ' + uuidstr)
        time.sleep(app.config[SLEEP_TIME_KEY])
        counter = counter + 1
    if taskpath is None:
        app.logger.info('Wait time exceeded while looking for: ' + uuidstr)
    return taskpath
def wait_for_task ( uuidstr , hintlist = None ) : if uuidstr is None : app . logger . error ( 'uuid is None' ) return None counter = 0 taskpath = None done_dir = get_done_dir ( ) while counter < app . config [ WAIT_COUNT_KEY ] : taskpath = get_task ( uuidstr , iphintlist = hintlist , basedir = done_dir ) if taskpath is not None : break app . logger . debug ( 'Sleeping while waiting for ' + uuidstr ) time . sleep ( app . config [ SLEEP_TIME_KEY ] ) counter = counter + 1 if taskpath is None : app . logger . info ( 'Wait time exceeded while looking for: ' + uuidstr ) return taskpath
Waits for task to appear in done directory
Waits for task to appear in done directory
"""
    Waits for task to appear in done directory
    :param uuidstr: uuid of task
    :param hintlist: list of ip addresses to search under
    :return: string containing full path to task or None if not found
    """
string containing full path to task or None if not found
string containing full path to task or None if not found
uuidstr
uuid of task
uuid of task
hintlist
list of ip addresses to search under
list of ip addresses to search under