Skip to content

Commit

Permalink
move setting up job into manager
Browse files Browse the repository at this point in the history
  • Loading branch information
michelwi committed May 6, 2024
1 parent 0da764a commit 47bef9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions sisyphus/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
3 changes: 3 additions & 0 deletions sisyphus/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47bef9b

Please sign in to comment.