Skip to content

Commit

Permalink
fix: better error messages in case of missing files after latency per…
Browse files Browse the repository at this point in the history
…iod (#1528)

* fix: better error messages in case of missing files after latency period

* fix syntax error
  • Loading branch information
johanneskoester committed Mar 30, 2022
1 parent 950d8ba commit 5b394c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 1 addition & 4 deletions snakemake/dag.py
Expand Up @@ -502,10 +502,7 @@ def check_and_touch_output(
)
except IOError as e:
raise MissingOutputException(
str(e) + "\nThis might be due to "
"filesystem latency. If that is the case, consider to increase the "
"wait time with --latency-wait."
+ "\nJob id: {jobid}".format(jobid=job.jobid),
str(e),
rule=job.rule,
jobid=self.jobid(job),
)
Expand Down
8 changes: 5 additions & 3 deletions snakemake/io.py
Expand Up @@ -824,10 +824,12 @@ def get_missing():
if not get_missing():
return
time.sleep(1)
missing = "\n".join(get_missing())
raise IOError(
"Missing files after {} seconds:\n{}".format(
latency_wait, "\n".join(get_missing())
)
f"Missing files after {latency_wait} seconds. This might be due to "
"filesystem latency. If that is the case, consider to increase the "
"wait time with --latency-wait:\n"
f"{missing}"
)


Expand Down

0 comments on commit 5b394c0

Please sign in to comment.