From 874f67dfb2e5a58a7857d03b3eab7ed779b19fe8 Mon Sep 17 00:00:00 2001 From: Leonardo Schwarz Date: Tue, 20 Aug 2024 11:17:04 +0200 Subject: [PATCH] set workunit available, only after all jobs finished --- src/depiction_targeted_preprocbatch/executor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/depiction_targeted_preprocbatch/executor.py b/src/depiction_targeted_preprocbatch/executor.py index 8e38f0b..582696d 100644 --- a/src/depiction_targeted_preprocbatch/executor.py +++ b/src/depiction_targeted_preprocbatch/executor.py @@ -79,6 +79,7 @@ def run(self, n_jobs: int) -> None: self.run_job(job) # parallel = joblib.Parallel(n_jobs=n_jobs, verbose=10) # parallel(joblib.delayed(self.run_job)(job) for job in jobs) + self._set_workunit_available() def run_job(self, job: BatchJob) -> None: """Runs a single job.""" @@ -109,9 +110,6 @@ def run_job(self, job: BatchJob) -> None: force_ssh_user=self._force_ssh_user, ) - # finish - self._set_workunit_available() - def _determine_result_files(self, job_dir: Path) -> list[Path]: """Returns the requested result files based on the pipeline parameters for a particular job.""" pipeline_params = PipelineParameters.parse_yaml(path=job_dir / job_dir.stem / "pipeline_params.yml")