1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

do not fail entire notification chain if one fails

This commit is contained in:
AlanCoding 2018-05-16 15:16:40 -04:00
parent 1d9fb53879
commit f9871f32a3
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -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)