Skip to content

Commit

Permalink
better, do not stat over and over
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Nov 20, 2023
1 parent 7e714a7 commit 546efb6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sisyphus/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,10 @@ def _sis_cleanable(self):
elif self._sis_cleanable_cache:
return True
else:
cleanable = (
not os.path.islink(self._sis_path())
and not os.path.isfile(self._sis_path(gs.JOB_FINISHED_ARCHIVE))
and self._sis_finished()
)
if not os.path.islink(self._sis_path()):
self._sis_cleaned_or_not_cleanable = True
return False
cleanable = not os.path.isfile(self._sis_path(gs.JOB_FINISHED_ARCHIVE)) and self._sis_finished()
if cleanable:
self._sis_cleanable_cache = True
return cleanable
Expand Down

0 comments on commit 546efb6

Please sign in to comment.