def wait_server_to_active(url, auth_token, wait=20, timeout=600):
    time.sleep(wait)

    resp = _http_requests_json(url, {"X-Auth-Token": auth_token})
    status = resp["server"]["status"]
    print("Server status: %s" % status)

    if str(status) == "BUILD" and wait < timeout:
        wait += wait/2
        return wait_server_to_active(url, auth_token, wait, timeout)

    return resp
view_pe_deep.py: Unit test
dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/tools/ci/server_creator.py/wait_server_to_active--crossover with--dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/view_pe_deep.py/test