예제 #1
0
    def load_services(self):
        # load default services
        self.service_errors = core.services.load()

        # load custom services
        service_paths = self.config.get("custom_services_dir")
        logging.debug("custom service paths: %s", service_paths)
        if service_paths:
            for service_path in service_paths.split(","):
                service_path = service_path.strip()
                custom_service_errors = ServiceManager.add_services(
                    service_path)
                self.service_errors.extend(custom_service_errors)
예제 #2
0
    def load_services(self) -> None:
        """
        Loads default and custom services for use within CORE.

        :return: nothing
        """
        # load default services
        self.service_errors = core.services.load()

        # load custom services
        service_paths = self.config.get("custom_services_dir")
        logging.debug("custom service paths: %s", service_paths)
        if service_paths:
            for service_path in service_paths.split(","):
                service_path = service_path.strip()
                custom_service_errors = ServiceManager.add_services(
                    service_path)
                self.service_errors.extend(custom_service_errors)
예제 #3
0
    def _load_services(self) -> None:
        """
        Loads default and custom services for use within CORE.

        :return: nothing
        """
        # load default services
        self.service_errors = ServiceManager.load_locals()
        # load custom services
        service_paths = self.config.get("custom_services_dir")
        logger.debug("custom service paths: %s", service_paths)
        if service_paths is not None:
            for service_path in service_paths.split(","):
                service_path = Path(service_path.strip())
                custom_service_errors = ServiceManager.add_services(
                    service_path)
                self.service_errors.extend(custom_service_errors)
        # load default config services
        self.service_manager.load_locals()
        # load custom config services
        custom_dir = self.config.get("custom_config_services_dir")
        if custom_dir is not None:
            custom_dir = Path(custom_dir)
            self.service_manager.load(custom_dir)