CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
esMonitoring.AsyncLineReaderTimeoutMixin Class Reference
Inheritance diagram for esMonitoring.AsyncLineReaderTimeoutMixin:
esMonitoring.AsyncLineReaderMixin esMonitoring.FDOutputListener

Public Member Functions

def __init__ (self, timeout_secs)
 
def handle_read (self)
 
def readable (self)
 
- Public Member Functions inherited from esMonitoring.AsyncLineReaderMixin
def __init__ (self)
 
def handle_close (self)
 
def handle_line (self)
 
def handle_read (self)
 

Public Attributes

 last_read
 
 timeout_secs
 
- Public Attributes inherited from esMonitoring.AsyncLineReaderMixin
 line_buf
 not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return More...
 

Detailed Description

Definition at line 246 of file esMonitoring.py.

Constructor & Destructor Documentation

◆ __init__()

def esMonitoring.AsyncLineReaderTimeoutMixin.__init__ (   self,
  timeout_secs 
)

Definition at line 247 of file esMonitoring.py.

247  def __init__(self, timeout_secs):
248  self.timeout_secs = timeout_secs
249  self.last_read = time.time()
250 
251  super(AsyncLineReaderTimeoutMixin, self).__init__()
252 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ handle_read()

def esMonitoring.AsyncLineReaderTimeoutMixin.handle_read (   self)

Definition at line 253 of file esMonitoring.py.

References esMonitoring.AsyncLineReaderTimeoutMixin.last_read.

253  def handle_read(self):
254  self.last_read = time.time()
255  AsyncLineReaderMixin.handle_read(self)
256 

◆ readable()

def esMonitoring.AsyncLineReaderTimeoutMixin.readable (   self)

Definition at line 257 of file esMonitoring.py.

References ztee.GZipLog.handle_timeout(), esMonitoring.FDOutputListener.handle_timeout(), esMonitoring.AsyncLineReaderTimeoutMixin.last_read, and esMonitoring.AsyncLineReaderTimeoutMixin.timeout_secs.

257  def readable(self):
258  if (time.time() - self.last_read) >= self.timeout_secs:
259  self.last_read = time.time()
260  self.handle_timeout()
261 
262  return super(AsyncLineReaderTimeoutMixin, self).readable()
263 

Member Data Documentation

◆ last_read

esMonitoring.AsyncLineReaderTimeoutMixin.last_read

◆ timeout_secs

esMonitoring.AsyncLineReaderTimeoutMixin.timeout_secs

Definition at line 248 of file esMonitoring.py.

Referenced by esMonitoring.AsyncLineReaderTimeoutMixin.readable().