Changeset 95 for trunk/plugin
- Timestamp:
- 04/20/05 10:15:37 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin/togap.py
r93 r95 186 186 requested_time = self.getAttr( attrs, 'Resource_List.walltime' ) 187 187 requested_memory = self.getAttr( attrs, 'Resource_List.mem' ) 188 188 189 mynoderequest = self.getAttr( attrs, 'Resource_List.nodes' ) 190 189 191 if mynoderequest.find( ':' ) != -1 and mynoderequest.find( 'ppn' ) != -1: 190 192 ppn = mynoderequest.split( ':' )[1].split( 'ppn=' )[1] 191 193 else: 192 194 ppn = '' 195 193 196 status = self.getAttr( attrs, 'job_state' ) 194 start_timestamp = self.getAttr( attrs, 'mtime' ) 195 196 nodes = self.getAttr( attrs, 'exec_host' ).split( '+' ) 197 198 if status == 'R': 199 start_timestamp = self.getAttr( attrs, 'mtime' ) 200 nodes = self.getAttr( attrs, 'exec_host' ).split( '+' ) 201 else: 202 start_timestamp = '' 203 nodes = [ ] 204 197 205 nodeslist = [ ] 198 206 … … 220 228 jobs[ job_id ] = myAttrs 221 229 222 #self.printJob( jobs, job_id )223 224 230 debug_msg( 10, printTime() + ' job %s state changed' %(job_id) ) 225 231 … … 243 249 for jobid, jobattrs in jobs.items(): 244 250 245 if jobattrs['status'] in [ 'Q', 'R' ]: 246 247 gmetric_val = self.compileGmetricVal( jobid, jobattrs ) 248 249 for val in gmetric_val: 250 self.dp.multicastGmetric( 'TOGA-JOB-' + jobid, val ) 251 gmetric_val = self.compileGmetricVal( jobid, jobattrs ) 252 253 for val in gmetric_val: 254 self.dp.multicastGmetric( 'TOGA-JOB-' + jobid, val ) 251 255 252 256 def makeNodeString( self, nodelist ): … … 271 275 appendList.append( 'owner=' + jobattrs['owner'] ) 272 276 appendList.append( 'requested_time=' + jobattrs['requested_time'] ) 273 appendList.append( 'requested_memory=' + jobattrs['requested_memory'] ) 274 appendList.append( 'ppn=' + jobattrs['ppn'] ) 277 278 if jobattrs['requested_memory'] != '': 279 appendList.append( 'requested_memory=' + jobattrs['requested_memory'] ) 280 281 if jobattrs['ppn'] != '': 282 appendList.append( 'ppn=' + jobattrs['ppn'] ) 283 275 284 appendList.append( 'status=' + jobattrs['status'] ) 276 appendList.append( 'start_timestamp=' + jobattrs['start_timestamp'] ) 285 286 if jobattrs['start_timestamp'] != '': 287 appendList.append( 'start_timestamp=' + jobattrs['start_timestamp'] ) 288 277 289 appendList.append( 'reported=' + jobattrs['reported'] ) 278 290 appendList.append( 'poll_interval=' + str( jobattrs['poll_interval'] ) ) 279 291 appendList.append( 'domain=' + jobattrs['domain'] ) 280 appendList.append( 'nodes=' + self.makeNodeString( jobattrs['nodes'] ) ) 292 293 if len( jobattrs['nodes'] ) > 0: 294 appendList.append( 'nodes=' + self.makeNodeString( jobattrs['nodes'] ) ) 281 295 282 296 return self.makeAppendLists( appendList )
Note: See TracChangeset
for help on using the changeset viewer.