add job cancel dependency information

* Inventory updates that are canceled and are dependencies of jobs
result in the dependent job being canceled. This code adds a better
description to job_explanation so that a job marked as canceled can be
traced back to the inventory update that triggered this case.
This commit is contained in:
Chris Meyers
2017-03-13 12:52:33 -04:00
parent 388b0fdf04
commit 6a0916371b
3 changed files with 20 additions and 7 deletions

View File

@@ -633,10 +633,10 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin):
Canceling a job also cancels the implicit project update with launch_type
run.
'''
def cancel(self):
res = super(Job, self).cancel()
def cancel(self, job_explanation=None):
res = super(Job, self).cancel(job_explanation=job_explanation)
if self.project_update:
self.project_update.cancel()
self.project_update.cancel(job_explanation=job_explanation)
return res