mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
Merge pull request #8221 from beeankha/job_timeout_notification_bugfix
Enable "On Fail" Notifications to Send Upon Timeout of Job Templates Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -1506,6 +1506,8 @@ class BaseTask(object):
|
|||||||
self.instance.job_explanation = "Job terminated due to timeout"
|
self.instance.job_explanation = "Job terminated due to timeout"
|
||||||
status = 'failed'
|
status = 'failed'
|
||||||
extra_update_fields['job_explanation'] = self.instance.job_explanation
|
extra_update_fields['job_explanation'] = self.instance.job_explanation
|
||||||
|
# ensure failure notification sends even if playbook_on_stats event is not triggered
|
||||||
|
handle_success_and_failure_notifications.apply_async([self.instance.job.id])
|
||||||
|
|
||||||
except InvalidVirtualenvError as e:
|
except InvalidVirtualenvError as e:
|
||||||
extra_update_fields['job_explanation'] = e.message
|
extra_update_fields['job_explanation'] = e.message
|
||||||
|
|||||||
Reference in New Issue
Block a user