Commit 2689e588 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Send phone alerts before email alerts

Email alerts seem to be more problematic due to AWS SES rate
limiting and phone alerts are more important, so we should send
phone alerts first.
parent b86af820
......@@ -69,12 +69,12 @@ def issue_alerts(event_or_superevent, alert_type, serialized_object,
# Try to get label explicitly from kwargs
label = kwargs.get('label', None)
# Issue email alerts
if settings.SEND_EMAIL_ALERTS and email_recipients.exists():
issue_email_alerts(event_or_superevent, alert_type, email_recipients,
label=label)
# Issue phone alerts
if settings.SEND_PHONE_ALERTS and phone_recipients.exists():
issue_phone_alerts(event_or_superevent, alert_type, phone_recipients,
label=label)
# Issue email alerts
if settings.SEND_EMAIL_ALERTS and email_recipients.exists():
issue_email_alerts(event_or_superevent, alert_type, email_recipients,
label=label)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment