mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix a bug: errored jobs weren't actually being deleted.
This commit is contained in:
@@ -281,11 +281,10 @@ class RootController( BaseController ):
|
||||
if data.parent_id is None and len( data.creating_job_associations ) > 0:
|
||||
# Mark associated job for deletion
|
||||
job = data.creating_job_associations[0].job
|
||||
if job.state not in [ model.Job.states.QUEUED, model.Job.states.RUNNING, model.Job.states.NEW ]:
|
||||
return
|
||||
# Are *all* of the job's other output datasets deleted?
|
||||
if job.check_if_output_datasets_deleted():
|
||||
job.mark_deleted()
|
||||
if job.state in [ model.Job.states.QUEUED, model.Job.states.RUNNING, model.Job.states.NEW ]:
|
||||
# Are *all* of the job's other output datasets deleted?
|
||||
if job.check_if_output_datasets_deleted():
|
||||
job.mark_deleted()
|
||||
self.app.model.flush()
|
||||
|
||||
@web.expose
|
||||
|
||||
Reference in New Issue
Block a user