[web/sessions] simplify session cleanup
session.cnx.check() is no longer a thing. It dates back to dbapi.
--- a/web/views/sessions.py Wed Jul 29 10:17:42 2015 +0200
+++ b/web/views/sessions.py Wed Jul 29 10:18:23 2015 +0200
@@ -61,15 +61,7 @@
closed, total = 0, 0
for session in self.current_sessions():
total += 1
- try:
- last_usage_time = session.cnx.check()
- except AttributeError:
- last_usage_time = session.mtime
- except BadConnectionId:
- self.close_session(session)
- closed += 1
- continue
-
+ last_usage_time = session.mtime
no_use_time = (time() - last_usage_time)
if session.anonymous_session:
if no_use_time >= self.cleanup_anon_session_time: