Changeset 179 for trunk/daemon/togad.py


Ignore:
Timestamp:
08/03/05 10:24:23 (19 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

  • Rearranged thread locking, I suspect a conflict
  • Disabled error checking on rrd update:
    • more important to have correct last update time!
    • with correct update time there will be no errors anyway
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r176 r179  
    10191019                """Store metric from host in memory"""
    10201020
     1021                # <ATOMIC>
     1022                #
     1023                self.slot.acquire()
     1024               
    10211025                if self.myMetrics.has_key( host ):
    10221026
     
    10281032
    10291033                                                # Allready have this metric, abort
     1034                                                self.slot.release()
    10301035                                                return 1
    10311036                        else:
     
    10381043                # atomic code; only 1 thread at a time may access the stack
    10391044
    1040                 # <ATOMIC>
    1041                 #
    1042                 self.slot.acquire()
    1043 
    10441045                self.myMetrics[ host ][ metric['name'] ].append( metric )
    10451046
     
    11331134                                                except IndexError, msg:
    11341135
     1136                                                        # Somehow sometimes myMetrics[ hostname ][ metricname ]
     1137                                                        # is still len 0 when the statement is executed.
     1138                                                        # Just ignore indexerror's..
    11351139                                                        pass
    11361140
     
    11601164                                        update_rets.append( update_ret )
    11611165
    1162                                 if not (1) in update_rets:
    1163 
    1164                                         self.memLastUpdate( hostname, metricname, metrics_to_store )
     1166                                # Lets ignore errors here for now, we need to make sure last update time
     1167                                # is correct!
     1168                                #
     1169                                #if not (1) in update_rets:
     1170
     1171                                self.memLastUpdate( hostname, metricname, metrics_to_store )
    11651172
    11661173        def makeTimeSerial( self ):
Note: See TracChangeset for help on using the changeset viewer.