only look at user routes

when loading last_activity from the proxy
This commit is contained in:
MinRK
2014-09-26 17:30:23 -07:00
parent e3dbca24c5
commit 6e22933c63

View File

@@ -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