Skip to content

Commit f4ead42

Browse files
authored
Skip unnecessary file checks (#1694)
1 parent 10faf24 commit f4ead42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

submitit/core/submission.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ def process_job(folder: Union[Path, str]) -> None:
4141
logger.info(f"Loading pickle: {paths.submitted_pickle}")
4242
wait_time = 60
4343
for _ in range(wait_time):
44-
if not paths.submitted_pickle.exists():
45-
time.sleep(1)
44+
if paths.submitted_pickle.exists():
45+
break
46+
time.sleep(1)
4647
if not paths.submitted_pickle.exists():
4748
raise RuntimeError(
4849
f"Waited for {wait_time} seconds but could not find submitted jobs in path:\n{paths.submitted_pickle}"

0 commit comments

Comments
 (0)