mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 14:33:00 +00:00
remove stopped users from proxy on startup
We already added running users, but we didn't handle removing users from the proxy if the user's server was stopped (e.g. while the Hub was restarting).
This commit is contained in:
@@ -1112,7 +1112,7 @@ class JupyterHub(Application):
|
||||
if self.proxy.public_server.is_up() or self.proxy.api_server.is_up():
|
||||
# check for *authenticated* access to the proxy (auth token can change)
|
||||
try:
|
||||
yield self.proxy.get_routes()
|
||||
routes = yield self.proxy.get_routes()
|
||||
except (HTTPError, OSError, socket.error) as e:
|
||||
if isinstance(e, HTTPError) and e.code == 403:
|
||||
msg = "Did CONFIGPROXY_AUTH_TOKEN change?"
|
||||
@@ -1124,6 +1124,7 @@ class JupyterHub(Application):
|
||||
return
|
||||
else:
|
||||
self.log.info("Proxy already running at: %s", self.proxy.public_server.bind_url)
|
||||
yield self.proxy.check_routes(self.users, self._service_map, routes)
|
||||
self.proxy_process = None
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user