- Timestamp:
- 04/08/05 15:16:43 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/togad.py
r54 r55 23 23 # 7 = daemon threading 24 24 # 25 DEBUG_LEVEL = 825 DEBUG_LEVEL = 7 26 26 27 27 # Where is the gmetad.conf located … … 63 63 STORE_TIMEOUT = 360 64 64 65 # Number of storing threads66 #67 STORE_THREADS = 168 65 """ 69 66 This is TOrque-GAnglia's data Daemon … … 352 349 353 350 xmlthread = threading.Thread( None, self.processXML, 'xmlthread' ) 354 355 storethreads = [ ] 356 357 for num in range( int( STORE_THREADS ) ): 358 359 storethreads.append( threading.Thread( None, self.storeMetrics, 'storethread' ) ) 351 storethread = threading.Thread( None, self.storeMetrics, 'storethread' ) 360 352 361 353 while( 1 ): … … 369 361 xmlthread.start() 370 362 371 for storethread in storethreads: 372 373 mythread = storethreads.index( storethread ) 374 375 if not storethread.isAlive(): 376 377 # Store metrics every .. sec 378 379 # threaded call to: self.storeMetrics() 380 # 381 storethreads[ mythread ] = threading.Thread( None, self.storeMetrics, 'storethread' ) 382 storethreads[ mythread ].start() 363 if not storethread.isAlive(): 364 # Store metrics every .. sec 365 366 # threaded call to: self.storeMetrics() 367 # 368 storethread = threading.Thread( None, self.storeMetrics, 'storethread' ) 369 storethread.start() 383 370 384 371 # Just sleep a sec here, to prevent daemon from going mad. We're all threads here anyway … … 392 379 # Store metrics somewhere between every 60 and 180 seconds 393 380 # 394 #STORE_INTERVAL = random.randint( 360, 640 ) 395 STORE_INTERVAL = 60 381 STORE_INTERVAL = random.randint( 360, 640 ) 396 382 397 383 storethread = threading.Thread( None, self.storeThread, 'storemetricthread' )
Note: See TracChangeset
for help on using the changeset viewer.