def __init__(self): data_type_list = data_type_dao.query_data_type() for data_type in data_type_list: data_id = data_type['id'] self.__data_types[data_id] = data_type self.__data_pool = Queue.Queue(config.MAX_QUEUE_SIZE) self.__task_center = task_center.TaskCenter(self) self.__worker = DataWorker(self.__data_pool, self.__task_center) self.__worker.start()
def get_data_type_list(self): return data_type_dao.query_data_type()