Explorar o código

Bug fix with delay

Steve L. Nyemba %!s(int64=8) %!d(string=hai) anos
pai
achega
424166e7d6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/utils/agents/data-collector.py

+ 2 - 2
src/utils/agents/data-collector.py

@@ -69,7 +69,7 @@ class ICollector(Thread) :
 	def run(self):
 		write_class 	= self.config['store']['class']['write']
 		read_args	= self.config['store']['args']
-		
+		DELAY	= self.config['delay'] * 60
 		while self.quit == False:
 			
 			for thread in self.pool :
@@ -92,7 +92,7 @@ class ICollector(Thread) :
 			if 'MONITOR_CONFIG_PATH' in os.environ :
 				break
 			print '\t *** ',str(datetime.today()),' ** '
-			time.sleep(self.DELAY)
+			time.sleep(DELAY)
 			
 		print ' *** Exiting ',self.name
 		# read_class=self.config['class']['read']