Changeset 91 for trunk


Ignore:
Timestamp:
04/20/05 09:16:52 (19 years ago)
Author:
bastiaans
Message:

plugin/PBSQuery.py:

  • Custom version with destructor that kills pbs connection to server

plugin/togap.py:

  • Misc
Location:
trunk/plugin
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugin/togap.py

    r88 r91  
    9595                                                if version_patch < 1:
    9696                                               
    97                                                         incompatbiel = 1
     97                                                        incompatible = 1
    9898
    9999                return incompatible
     
    121121                """Setup appropriate variables"""
    122122
    123                 self.pq = PBSQuery()
    124123                self.jobs = { }
    125124                self.dp = DataProcessor()
     125                self.initPbsQuery()
     126
     127        def initPbsQuery( self ):
     128
     129                self.pq = None
     130                self.pq = PBSQuery()
    126131
    127132        def getAttr( self, attrs, name ):
     
    162167                        jobs = { }
    163168
     169                self.initPbsQuery()
     170                time.sleep( 1 )
     171               
    164172                joblist = self.pq.getjobs()
    165173
     
    236244                for jobid, jobattrs in jobs.items():
    237245
    238                         gmetric_val = self.compileGmetricVal( jobid, jobattrs )
    239 
    240                         for val in gmetric_val:
    241                                 self.dp.multicastGmetric( 'TOGA-JOB-' + jobid, val )
     246                        if jobattrs['status'] in [ 'Q', 'R' ]:
     247
     248                                gmetric_val = self.compileGmetricVal( jobid, jobattrs )
     249
     250                                for val in gmetric_val:
     251                                        self.dp.multicastGmetric( 'TOGA-JOB-' + jobid, val )
    242252
    243253        def makeNodeString( self, nodelist ):
Note: See TracChangeset for help on using the changeset viewer.