From f9871f32a3dc287b2c4d36349c0c8bff085c4fd6 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Wed, 16 May 2018 15:16:40 -0400 Subject: [PATCH] do not fail entire notification chain if one fails --- awx/main/tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index f0c5adfef2..68dd21e804 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -255,7 +255,10 @@ def send_notifications(notification_list, job_id=None): notification.error = smart_str(e) update_fields.append('error') finally: - notification.save(update_fields=update_fields) + try: + notification.save(update_fields=update_fields) + except Exception as e: + logger.exception(six.text_type('Error saving notification {} result.').format(notification.id)) @shared_task(bind=True, queue=settings.CELERY_DEFAULT_QUEUE)