def _load_expression_engines(self) -> Dict[str, BaseEngine]: """Load expression engines.""" expression_engines = getattr( settings, "FLOW_EXPRESSION_ENGINES", ["resolwe.flow.expression_engines.jinja"], ) return load_engines(self, "ExpressionEngine", "expression_engines", expression_engines)
def load_execution_engines(self, engines): """Load execution engines.""" return load_engines(self, "ExecutionEngine", "execution_engines", engines)
def load_execution_engines(self, engines): """Load execution engines.""" return load_engines(self, 'ExecutionEngine', 'execution_engines', engines)
def _load_execution_engines(self) -> Dict[str, BaseEngine]: """Load execution engines.""" execution_engines = getattr(settings, "FLOW_EXECUTION_ENGINES", ["resolwe.flow.execution_engines.bash"]) return load_engines(self, "ExecutionEngine", "execution_engines", execution_engines)
def load_executor(self, executor_name): """Load process executor.""" engines = load_engines(self, 'FlowExecutor', 'executors', [executor_name], 'EXECUTOR', 'executor') # List conversion needed for Python 3, where values() returns a view. return list(engines.values())[0]
def load_execution_engines(self, engines: List[Union[dict, str]]): """Load execution engines.""" return load_engines(self, "ExecutionEngine", "execution_engines", engines)
def load_expression_engines(self, engines: List[Union[Dict, str]]): """Load expression engines.""" return load_engines(self, "ExpressionEngine", "expression_engines", engines)