Merge pull request #736 from dannon/pja_wf_rerun_fix

Check to make sure a job is actually part of a workflow invocation pr…
This commit is contained in:
John Chilton
2015-09-17 14:50:07 +01:00
+3
View File
@@ -404,6 +404,9 @@ class DeleteIntermediatesAction(DefaultJobAction):
# POTENTIAL ISSUES: When many outputs are being finish()ed
# concurrently, sometimes non-terminal steps won't be cleaned up
# because of the lag in job state updates.
if not job.workflow_invocation_step:
log.debug("This job is not part of a workflow invocation, delete intermediates aborted.")
return
wfi = job.workflow_invocation_step.workflow_invocation
if wfi.active:
log.debug("Workflow still scheduling so new jobs may appear, skipping deletion of intermediate files.")