def __init__(self,target_folder,cpu):
		Informant.__init__(self,"ZTM")

		self.__folder_to_watch__ = target_folder
		self.__zipper_pool__ = Pool(processes=1)
		self.logs_collection =  self.__class__.connection().logs
		self.working = True
	def __init__(self,workers=4):
		Informant.__init__(self,"MONIT")

		self.__logs_collection__ = self.__class__.connection().logs
		self.__max_workers = workers
		self.__worker_pool__ = None
		self.__workers = []
		self.__working = False
Beispiel #3
0
def main():
    start_puzzle, final_puzzle = get_conf()

    for heuristic_type in range(1, 4):
        visited_nodes, final_node, execution_time = greedy_algo(
            start_puzzle, final_puzzle, heuristic_type)
        Informant.give_info(visited_nodes, final_node, execution_time,
                            heuristic_type)
	def __init__(self,file_worker,sec=10):

		StoppableThread.__init__(self)
		Informant.__init__(self,"BEAT")

		if file_worker is not None:
			self.file_worker = file_worker
		else:
			raise Exception("File Worker is None")

		self.__sleep_seconds = sec
	def __init__(self,DIR,log_file,flush_freq):

#		StoppableThread.__init__(self)
		Informant.__init__(self,"FTW")

		self.line_cursor = 0
		self.__file_id__ = None
		self.logs_collection = self.__class__.connection().logs
		self.__working = False
		self.eligible_count = 0
		self.__log_file = log_file
		self.__log_file_fpath = DIR+log_file

		self.flush_freq = flush_freq
		self.reduced_log_file= self.__log_file_fpath + ".output"
		self.reduced_log_file_info = "%s.info.log" % self.reduced_log_file
		self.reduced_log_stream = None
		self.__agent_cache = {}

		self.__reduce_queue = Queue()
		self.__output_queue = Queue()