[go: nahoru, domu]

Skip to content

Commit

Permalink
always check output file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Aug 4, 2022
1 parent 1936272 commit 131576f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,12 @@ def fail(message=job.info, exception=None):
# Prior to fail we need to set job.state
job.set_state(final_job_state)
return fail(f"Job {job.id}'s output dataset(s) could not be read")
else:
# check existence of outputs (tools may delete outputs)
for dataset_path in self.get_output_fnames():
if not os.path.exists(dataset_path.real_path):
job.set_state(final_job_state)
return fail(f"Job {job.id}'s output dataset(s) could not be read")

job_context = ExpressionContext(dict(stdout=job.stdout, stderr=job.stderr))
if extended_metadata:
Expand Down

0 comments on commit 131576f

Please sign in to comment.