Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 288

Show
Ignore:
Timestamp:
06/11/05 17:03:10
Author:
mikerobi
Message:

logdebuginfofilter no longer prints sessionMap size, this fixes a bug where sessions contain unpicklable objects, and it isn\'t as meaningfull with the new sessionFilter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/lib/filter/logdebuginfofilter.py

    r247 r288  
    7272                logList.append("Page size: %.02fKB" % ( 
    7373                    len(body)/float(1024))) 
    74              
     74            '''  
     75            # this is not compatible with the session filter 
    7576            if (cpg.config.get('logDebugInfoFilter.logSessionSize', True) 
    7677                and cpg.config.get('session.storageType')): 
     
    8586                except: 
    8687                    logList.append("Session data size: Unable to pickle session") 
     88            ''' 
    8789             
    8890            debuginfo += ', '.join(logList) 
  • trunk/cherrypy/lib/filter/sessionfilter/sqlobjectsession.py

    r284 r288  
    4949        if attr in ['timestamp', 'timeout', 'lastAccess', 'key']: 
    5050            return getattr(self.__sqlObject, self.__attrSub(attr)) 
     51        else: 
     52            return object.__getattr__(self, attr) 
    5153 
    5254    def __setattr__(self, attr, value): 
     
    112114    def cleanUpOldSessions(self): 
    113115        # running a single query would be a huge performace boost 
    114         for sessionKey in __data: 
    115             session = sessionData[sessionKey] 
    116             if session.expired(): 
    117                 self.delSession(sessionKey) 
    118  
    119 ''' 
    120 Session.createTable() 
    121 p = Session(session_key = 'abcd', timestamp = 330, count = 123) 
    122 Session.delete(Session.q.session_key=='abcd') 
    123  
    124 smanage = SQLObjectSession('test') 
    125 print smanage.getSession('abcd') 
    126 ''' 
     116        pass 
  • trunk/cherrypy/test/test_logdebuginfo_filter.py

    r267 r288  
    6060        self.assert_('Build time' in cpg.response.body) 
    6161        self.assert_('Page size' in cpg.response.body) 
    62         self.assert_('Session data size' in cpg.response.body) 
     62        # not compatible with the sessionFilter 
     63        #self.assert_('Session data size' in cpg.response.body) 
    6364 
    6465 

Hosted by WebFaction

Log in as guest/cpguest to create tickets