def start_io_services(self): """ Intilialize and fork off IO services. """ for name in self.configuration.io_services: its_conn, ours_conn = self.create_connection() io_config = IOConfig(self.configuration, name) io_service = io_config.create_service(its_conn) self._add_service(ours_conn, io_service) io_service.start()
def __init__(self, config, hub_connection): super().__init__(MODEL, config, hub_connection) self.read_list = [self.hub_connection] self.model_dir = os.path.abspath(os.path.join(config.data_dir, 'model')) self.storage = ModelStorage(self.model_dir) io_idioms = {} for name in config.io_services: io_idioms[name] = IOConfig.model_idiom(config.io_services[name][0], name) self.model = self.storage.read_model(io_idioms) self.io_idioms = io_idioms self.dirty = False