equal
deleted
inserted
replaced
39 self.cleanup_anon_session_time = self.vreg.config['cleanup-anonymous-session-time'] or 120 |
39 self.cleanup_anon_session_time = self.vreg.config['cleanup-anonymous-session-time'] or 120 |
40 assert self.cleanup_anon_session_time > 0 |
40 assert self.cleanup_anon_session_time > 0 |
41 if self.session_time: |
41 if self.session_time: |
42 assert self.cleanup_session_time < self.session_time |
42 assert self.cleanup_session_time < self.session_time |
43 assert self.cleanup_anon_session_time < self.session_time |
43 assert self.cleanup_anon_session_time < self.session_time |
44 self.set_authmanager() |
|
45 CW_EVENT_MANAGER.bind('after-registry-reload', self.set_authmanager) |
|
46 |
|
47 def set_authmanager(self): |
|
48 self.authmanager = self.vreg['components'].select('authmanager') |
44 self.authmanager = self.vreg['components'].select('authmanager') |
49 |
45 |
50 def clean_sessions(self): |
46 def clean_sessions(self): |
51 """cleanup sessions which has not been unused since a given amount of |
47 """cleanup sessions which has not been unused since a given amount of |
52 time. Return the number of sessions which have been closed. |
48 time. Return the number of sessions which have been closed. |