rasa/core/training/interactive.py
async def wait_til_server_is_running(endpoint,
                                     max_retries=30,
                                     sleep_between_retries=1):
    """Try to reach the server, retry a couple of times and sleep in between."""

    while max_retries:
        try:
            r = await retrieve_status(endpoint)
            logger.info("Reached core: {}".format(r))
            if not r.get("is_ready"):
                # server did not finish loading the agent yet
                # in this case, we need to wait till the model trained
                # so we might be sleeping for a while...
                await asyncio.sleep(sleep_between_retries)
                continue
            else:
                # server is ready to go
                return True
        except ClientError:
            max_retries -= 1
            if max_retries:
                await asyncio.sleep(sleep_between_retries)

    return False
Try to reach the server, retry a couple of times and sleep in between.
Try to reach the server, retry a couple of times and sleep in between.
Try to reach the server retry a couple of times and sleep in between .
async def wait_til_server_is_running(endpoint,
                                     max_retries=30,
                                     sleep_between_retries=1):
    while max_retries:
        try:
            r = await retrieve_status(endpoint)
            logger.info("Reached core: {}".format(r))
            if not r.get("is_ready"):
                await asyncio.sleep(sleep_between_retries)
                continue
            else:
                return True
        except ClientError:
            max_retries -= 1
            if max_retries:
                await asyncio.sleep(sleep_between_retries)
    return False
async def wait_til_server_is_running ( endpoint , max_retries = 30 , sleep_between_retries = 1 ) : while max_retries : try : r = await retrieve_status ( endpoint ) logger . info ( "Reached core: {}" . format ( r ) ) if not r . get ( "is_ready" ) : await asyncio . sleep ( sleep_between_retries ) continue else : return True except ClientError : max_retries -= 1 if max_retries : await asyncio . sleep ( sleep_between_retries ) return False
Try to reach the server, retry a couple of times and sleep in between.
Try to reach the server retry a couple of times and sleep in between .
"""Try to reach the server, retry a couple of times and sleep in between.""" # server did not finish loading the agent yet # in this case, we need to wait till the model trained # so we might be sleeping for a while... # server is ready to go
endpoint
max_retries
sleep_between_retries