Пример #1
0
	def __init__(self, interfaceType):
		Thread.__init__(self)
		self.type = interfaceType
		conf = getConf(interfaceType)
		self.queryManager = QueryManager(interfaceType, conf['auth'])
		self.dataMiner = DataMiner(self.queryManager, self)
		self.strategy = Strategy(interfaceType, self.queryManager)
		self.status = False
Пример #2
0
	def run(self):
		try:
			self.status = True
			self.queryManager.update_all()
			self.strategy.recovery(getConf(self.type)['backup'])
		except BadQuery:
			self.stop()
		else:
			self.dataMiner.start()