Changeset 950
- Timestamp:
- 01/20/14 17:05:59 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/jobmond/jobmond.py
r944 r950 697 697 sys.exit( 1 ) 698 698 699 self.gmetric_send_instances = { } 700 701 702 def __del__( self ): 703 704 for send_instance in self.gmetric_send_instances: 705 706 del send_instance 707 699 708 def checkGmetricVersion( self ): 700 709 … … 757 766 debug_msg( 10, printTime() + ' ' + metric_debug) 758 767 759 gm = Gmetric( c_ip, c_port ) 760 761 gm.send( str( metricname ), str( metricval ), str( self.dmax ), valtype, units ) 768 if not self.gmetric_send_instances.has_key( (c_ip, c_port) ): 769 770 self.gmetric_send_instances[ (c_ip, c_port) ] = Gmetric( c_ip, c_port ) 771 772 self.gmetric_send_instances[ (c_ip, c_port) ].send( str( metricname ), str( metricval ), str( self.dmax ), valtype, units ) 762 773 763 774 elif GMETRIC_TARGET: … … 770 781 debug_msg( 10, printTime() + ' ' + metric_debug) 771 782 772 gm = Gmetric( GMETRIC_TARGET_HOST, GMETRIC_TARGET_PORT ) 773 774 gm.send( str( metricname ), str( metricval ), str( self.dmax ), valtype, units ) 783 if not self.gmetric_send_instances.has_key( (GMETRIC_TARGET_HOST, GMETRIC_TARGET_PORT) ): 784 785 self.gmetric_send_instances[ (GMETRIC_TARGET_HOST, GMETRIC_TARGET_PORT) ] = Gmetric( GMETRIC_TARGET_HOST, GMETRIC_TARGET_PORT ) 786 787 self.gmetric_send_instances[ (GMETRIC_TARGET_HOST, GMETRIC_TARGET_PORT) ].send( str( metricname ), str( metricval ), str( self.dmax ), valtype, units ) 775 788 776 789 else: … … 1784 1797 self.cur_time = time.time() 1785 1798 1786 except PBSError, detail:1799 except (PBSError, TypeError), detail: 1787 1800 1788 1801 debug_msg( 10, "PBS server unavailable, skipping until next polling interval: " + str( detail ) ) … … 1983 1996 self.tmax = 60 1984 1997 1998 def __del__( self ): 1999 2000 self.socket.close() 2001 1985 2002 def checkHostProtocol( self, ip ): 1986 2003
Note: See TracChangeset
for help on using the changeset viewer.