

def _start_proxy_server(self):
    token = self._generate_auth_token()
    self._launch_proxy_server(token)
    num_retries = 5
    for i in range(num_retries):
        debug_log(self.TAG, 'Sleeping for 20s before getting proxy URL')
        time.sleep(20)
        proxy_url = self._get_proxy_url()
        if proxy_url:
            debug_log(self.TAG, 'proxy_url: {}'.format(proxy_url))
            self._write_proxy_info(proxy_url, token)
            break
    if (not proxy_url):
        error_log(self.TAG, "Could not obtain the proxy server's URL. Cluster launch unsuccessful")
        return False

dataset/ETHPy150Open binder-project/binder/binder/cluster.py KubernetesManager._start_proxy_server/original