Changeset 790


Ignore:
Timestamp:
04/05/13 10:35:10 (8 years ago)
Author:
ramonb
Message:
  • catch PBSError for PBSQuery.getnodes() just like with DataGatherer?.getJobData()
  • incidentally PBS server can be non responsive: should not crash jobmond
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/jobmond/jobmond.py

    r789 r790  
    869869       
    870870            l        = ['state']
    871        
    872             # TODO catch PBSError: like pq.getJobData
    873             for name, node in self.pq.getnodes().items():
     871
     872            nodelist = self.getNodeData()
     873
     874            for name, node in nodelist.items():
    874875
    875876                if ( node[ 'state' ].find( "down" ) != -1 ):
     
    15501551            pass
    15511552
     1553    def getNodeData( self ):
     1554
     1555        nodedict = { }
     1556
     1557        try:
     1558            nodedict = self.pq.getnodes()
     1559
     1560        except PBSError, detail:
     1561
     1562            debug_msg( 10, "PBS server unavailable, skipping until next polling interval: " + str( detail ) )
     1563
     1564        return nodedict
     1565
    15521566    def getJobData( self ):
    15531567
     
    15631577        except PBSError, detail:
    15641578
    1565             debug_msg( 10, "Caught PBS unavailable, skipping until next polling interval: " + str( detail ) )
     1579            debug_msg( 10, "PBS server unavailable, skipping until next polling interval: " + str( detail ) )
    15661580            return None
    15671581
Note: See TracChangeset for help on using the changeset viewer.