mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 23:42:59 +00:00
only look at user routes
when loading last_activity from the proxy
This commit is contained in:
@@ -661,7 +661,10 @@ class JupyterHubApp(Application):
|
|||||||
"""Update User.last_activity timestamps from the proxy"""
|
"""Update User.last_activity timestamps from the proxy"""
|
||||||
routes = yield self.proxy.fetch_routes()
|
routes = yield self.proxy.fetch_routes()
|
||||||
for prefix, route in routes.items():
|
for prefix, route in routes.items():
|
||||||
user = orm.User.find(self.db, route.get('user'))
|
if 'user' not in route:
|
||||||
|
# not a user route, ignore it
|
||||||
|
continue
|
||||||
|
user = orm.User.find(self.db, route['user'])
|
||||||
if user is None:
|
if user is None:
|
||||||
self.log.warn("Found no user for route: %s", route)
|
self.log.warn("Found no user for route: %s", route)
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user