Пример #1
0
 def test_clean(self, curs=None):
     self.create_actor_env()
     sess_id = self.login_actor()
     self.get_session(sess_id)
     sleep(settings.session_valid_minutes * 60)
     session_utils.clean(transaction)
     self.assertRaises(SessionNotFound, self.get_session, sess_id)
Пример #2
0
def run():
    while True:
        clean(transaction)
        logger.debug('Sleeping %s minutes', settings.session_cleaning_minutes)
        sleep(settings.session_cleaning_minutes * 60)