mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 23:37:39 -02:30
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user