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