[web/sessions] simplify session cleanup
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 29 Jul 2015 10:18:23 +0200
changeset 10578 c70606673384
parent 10577 935d577b2227
child 10579 9af9d59a1972
[web/sessions] simplify session cleanup session.cnx.check() is no longer a thing. It dates back to dbapi.
web/views/sessions.py
--- 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: