Skip to content
Snippets Groups Projects
Commit 6b62184c authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Prevent email sending failure from breaking process

parent 2689e588
No related branches found
No related tags found
No related merge requests found
...@@ -152,4 +152,10 @@ def issue_email_alerts(event_or_superevent, alert_type, recipients, ...@@ -152,4 +152,10 @@ def issue_email_alerts(event_or_superevent, alert_type, recipients,
# Send email messages # Send email messages
backend = get_connection() backend = get_connection()
backend.send_messages(messages) try:
backend.send_messages(messages)
except Exception as e:
# If there is a problem sending emails just log it and continue since
# email alerts aren't mission critical. But we log the information
# since we want to understand what is happening.
logger.error('Error sending email alerts: {e}'.format(e=e))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment