From 47bef9bb585b8b52f8a43ff467c1fd1bbc1be70b Mon Sep 17 00:00:00 2001 From: Wilfried Michel Date: Mon, 6 May 2024 16:23:07 +0200 Subject: [PATCH] move setting up job into manager --- sisyphus/job.py | 3 --- sisyphus/manager.py | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sisyphus/job.py b/sisyphus/job.py index a71fc80..d1e848e 100644 --- a/sisyphus/job.py +++ b/sisyphus/job.py @@ -799,9 +799,6 @@ def _sis_move(self) -> None: trash_path = "%s.cleared.%04i" % (path, i) logging.info("Move: %s to %s" % (path, trash_path)) os.rename(path, trash_path) - self._sis_setup_directory() - for t in self._sis_tasks(): - t.reset_cache() def _sis_delete(self) -> None: """Delete job directory""" diff --git a/sisyphus/manager.py b/sisyphus/manager.py index e93345a..749daf3 100644 --- a/sisyphus/manager.py +++ b/sisyphus/manager.py @@ -247,6 +247,9 @@ def clear_states(self, state=gs.STATE_ERROR): for job in self.jobs[state]: logging.warning("Clearing: %s" % job) job._sis_move() + job._sis_setup_directory() + for t in job._sis_tasks(): + t.reset_cache() job_cleared = True self.update_jobs() return job_cleared