diff --git a/executorlib/executor/flux.py b/executorlib/executor/flux.py index b3aecf78..a6066c11 100644 --- a/executorlib/executor/flux.py +++ b/executorlib/executor/flux.py @@ -348,7 +348,7 @@ def __init__( super().__init__( executor=create_file_executor( max_workers=max_workers, - backend="flux_submission", + backend="flux", max_cores=max_cores, cache_directory=cache_directory, resource_dict=resource_dict, diff --git a/executorlib/executor/slurm.py b/executorlib/executor/slurm.py index 505fe915..3f429e3b 100644 --- a/executorlib/executor/slurm.py +++ b/executorlib/executor/slurm.py @@ -160,7 +160,7 @@ def __init__( super().__init__( executor=create_file_executor( max_workers=max_workers, - backend="slurm_submission", + backend="slurm", max_cores=max_cores, cache_directory=cache_directory, resource_dict=resource_dict, diff --git a/executorlib/task_scheduler/file/task_scheduler.py b/executorlib/task_scheduler/file/task_scheduler.py index 65daffab..fa9d7c8b 100644 --- a/executorlib/task_scheduler/file/task_scheduler.py +++ b/executorlib/task_scheduler/file/task_scheduler.py @@ -80,7 +80,7 @@ def __init__( def create_file_executor( resource_dict: dict, max_workers: Optional[int] = None, - backend: str = "flux_submission", + backend: Optional[str] = None, max_cores: Optional[int] = None, cache_directory: Optional[str] = None, flux_executor=None, @@ -92,6 +92,7 @@ def create_file_executor( block_allocation: bool = False, init_function: Optional[Callable] = None, disable_dependencies: bool = False, + execute_function: Callable = execute_with_pysqa, ): if block_allocation: raise ValueError( @@ -112,6 +113,7 @@ def create_file_executor( return FileTaskScheduler( resource_dict=resource_dict, pysqa_config_directory=pysqa_config_directory, - backend=backend.split("_submission")[0], + backend=backend, disable_dependencies=disable_dependencies, + execute_function=execute_function, )