Back to index

python-weblib  1.3.9
Public Member Functions | Private Attributes
pyweblib.session.CleanUpThread Class Reference

List of all members.

Public Member Functions

def __init__
def run
def __repr__
def join

Private Attributes

 _sessionInstance
 _interval
 _stop_event
 _removed

Detailed Description

Thread class for clean-up thread

Definition at line 127 of file session.py.


Constructor & Destructor Documentation

def pyweblib.session.CleanUpThread.__init__ (   self,
  sessionInstance,
  interval = 60 
)

Definition at line 131 of file session.py.

00131 
00132     def __init__(self,sessionInstance,interval=60):
00133       self._sessionInstance = sessionInstance
00134       self._interval = interval
00135       self._stop_event = threading.Event()
00136       self._removed = 0
00137       threading.Thread.__init__(self,name=self.__class__.__module__+self.__class__.__name__)


Member Function Documentation

Definition at line 144 of file session.py.

00144 
00145     def __repr__(self):
00146       return '%s: %d sessions removed' % (
00147         self.getName(),self._removed
00148       )

def pyweblib.session.CleanUpThread.join (   self,
  timeout = 0.0 
)

Definition at line 149 of file session.py.

00149 
00150     def join(self,timeout=0.0):
00151       self._stop_event.set()
00152       threading.Thread.join(self,timeout)
00153 

Thread function for cleaning up session database

Definition at line 138 of file session.py.

00138 
00139     def run(self):
00140       """Thread function for cleaning up session database"""
00141       while not self._stop_event.isSet():
00142         self._removed += self._sessionInstance.cleanUp()
00143         self._stop_event.wait(self._interval)


Member Data Documentation

Definition at line 133 of file session.py.

Definition at line 135 of file session.py.

Definition at line 132 of file session.py.

Definition at line 134 of file session.py.


The documentation for this class was generated from the following file: