Changeset 74
- Timestamp:
- 04/15/05 11:55:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/togad.py
r73 r74 159 159 jobAttrs = { } 160 160 161 def __init__( self ):162 163 pass164 165 161 def startElement( self, name, attrs ): 166 162 """ … … 214 210 debug_msg( 0, 'jobinfo for job %s has changed' %job_id ) 215 211 212 def endElement( self, name, attrs ): 213 """When all metrics have gone, check if any jobs have finished""" 214 215 for jobid, jobinfo in self.jobAttrs.items(): 216 217 # This is an old job, not in current jobinfo list anymore 218 # it must have finished, since we _did_ get a new heartbeat 219 # 220 if jobinfo['reported'] < self.heartbeat: 221 222 self.jobAttrs[ jobid ]['status'] = 'F' 223 self.jobAttrs[ jobid ]['stop_timestamp'] = self.heartbeat 216 224 217 225 def jobinfoChanged( self, jobattrs, jobid, jobinfo ): 226 """ 227 Check if jobinfo has changed from jobattrs[jobid] 228 if it's report time is bigger than previous one 229 and it is report time is recent (equal to heartbeat) 230 """ 218 231 219 232 if jobattrs.has_key( jobid ): … … 225 238 if value != jobattrs[ jobid ][ valname ]: 226 239 227 return 1 240 if jobinfo['reported'] > jobattrs[ jobid ][ 'reported' ] and jobinfo['reported'] == self.heartbeat: 241 return 1 228 242 229 243 else:
Note: See TracChangeset
for help on using the changeset viewer.