def __wait_and_restart():
    """ Delay and then execute the restart. Do not call directly. Instead, call
    `do_restart()`.
    """
    log.info('Restarting server')
    sleep(1)
    # We can use the default event loop here because this
    # is actually running in a thread. We use aiohttp here because urllib is
    # painful and we don’t have `requests`.
    loop = asyncio.new_event_loop()
    loop.run_until_complete(_resin_supervisor_restart())
def __wait_and_restart ( ) : log . info ( 'Restarting server' ) sleep ( 1 ) loop = asyncio . new_event_loop ( ) loop . run_until_complete ( _resin_supervisor_restart ( ) )
Delay and then execute the restart. Do not call directly. Instead, call
    `do_restart()`.