mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
Merge pull request #4567 from jabbera/fix-version-check
Use {base_url}/api for checking hub version
This commit is contained in:
@@ -166,7 +166,7 @@ class Server(HasTraits):
|
|||||||
name=self.__class__.__name__, url=self.url, bind=self.bind_url
|
name=self.__class__.__name__, url=self.url, bind=self.bind_url
|
||||||
)
|
)
|
||||||
|
|
||||||
def wait_up(self, timeout=10, http=False, ssl_context=None):
|
def wait_up(self, timeout=10, http=False, ssl_context=None, extra_path=""):
|
||||||
"""Wait for this server to come up"""
|
"""Wait for this server to come up"""
|
||||||
if http:
|
if http:
|
||||||
ssl_context = ssl_context or make_ssl_context(
|
ssl_context = ssl_context or make_ssl_context(
|
||||||
@@ -174,7 +174,9 @@ class Server(HasTraits):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return wait_for_http_server(
|
return wait_for_http_server(
|
||||||
self.url, timeout=timeout, ssl_context=ssl_context
|
url_path_join(self.url, extra_path),
|
||||||
|
timeout=timeout,
|
||||||
|
ssl_context=ssl_context,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return wait_for_server(
|
return wait_for_server(
|
||||||
|
@@ -901,7 +901,10 @@ class User:
|
|||||||
ssl_context = make_ssl_context(key, cert, cafile=ca)
|
ssl_context = make_ssl_context(key, cert, cafile=ca)
|
||||||
try:
|
try:
|
||||||
resp = await server.wait_up(
|
resp = await server.wait_up(
|
||||||
http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
|
http=True,
|
||||||
|
timeout=spawner.http_timeout,
|
||||||
|
ssl_context=ssl_context,
|
||||||
|
extra_path="api",
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if isinstance(e, AnyTimeoutError):
|
if isinstance(e, AnyTimeoutError):
|
||||||
|
Reference in New Issue
Block a user