web/application.py
changeset 2867 e8581a4f1bae
parent 2788 8d3dbe577d3a
parent 2849 297a4b5c6ce4
child 2887 1282dc6525c5
equal deleted inserted replaced
2855:1d9be3dffa94 2867:e8581a4f1bae
    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.