예제 #1
0
파일: qxmlrpc.py 프로젝트: mrmaple/open_qon
 def _get_session(self, session_id):
     """Return the Quixote Session with given id, or None."""
     session_mgr = get_session_manager()
     try:
         session = session_mgr[session_id]
     except KeyError:
         session = None
     return session
예제 #2
0
파일: cron.py 프로젝트: mrmaple/open_qon
def expire_sessions():
    """Expire user sessions."""
    expired_count = get_session_manager().del_sessions(
        age=SESSION_EXPIRE_HOURS)
    if expired_count:
        transaction_commit(None, 'ExpireSessions')