mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Fail a job when the finish method fails.
This commit is contained in:
@@ -78,7 +78,11 @@ class LocalJobRunner( object ):
|
||||
log.exception("failure running job %d" % job_wrapper.job_id)
|
||||
return
|
||||
# Finish the job
|
||||
job_wrapper.finish( stdout, stderr )
|
||||
try:
|
||||
job_wrapper.finish( stdout, stderr )
|
||||
except:
|
||||
log.exception("Job wrapper finish method failed")
|
||||
job_wrapper.fail("Unable to finish job", exception=True)
|
||||
|
||||
def put( self, job_wrapper ):
|
||||
"""Add a job to the queue (by job identifier)"""
|
||||
|
||||
@@ -351,6 +351,7 @@ class PBSJobRunner( object ):
|
||||
pbs_job_state.job_wrapper.finish( stdout, stderr )
|
||||
except:
|
||||
log.exception("Job wrapper finish method failed")
|
||||
job_wrapper.fail("Unable to finish job", exception=True)
|
||||
|
||||
# clean up the pbs files
|
||||
self.cleanup( ( ofile, efile, job_file ) )
|
||||
|
||||
Reference in New Issue
Block a user