mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +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"""
|
||||
routes = yield self.proxy.fetch_routes()
|
||||
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:
|
||||
self.log.warn("Found no user for route: %s", route)
|
||||
continue
|
||||
|
Reference in New Issue
Block a user