mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Merge pull request #1443 from GSA/notify-api-1442
fix broken go live email notification
This commit is contained in:
@@ -170,7 +170,7 @@ def deliver_sms(self, notification_id):
|
||||
|
||||
|
||||
@notify_celery.task(
|
||||
bind=True, name="deliver_email", max_retries=48, default_retry_delay=300
|
||||
bind=True, name="deliver_email", max_retries=48, default_retry_delay=30
|
||||
)
|
||||
def deliver_email(self, notification_id):
|
||||
try:
|
||||
@@ -182,8 +182,12 @@ def deliver_email(self, notification_id):
|
||||
if not notification:
|
||||
raise NoResultFound()
|
||||
personalisation = redis_store.get(f"email-personalisation-{notification_id}")
|
||||
recipient = redis_store.get(f"email-recipient-{notification_id}")
|
||||
if personalisation:
|
||||
notification.personalisation = json.loads(personalisation)
|
||||
if recipient:
|
||||
notification.recipient = json.loads(recipient)
|
||||
|
||||
notification.personalisation = json.loads(personalisation)
|
||||
send_to_providers.send_email_to_provider(notification)
|
||||
except EmailClientNonRetryableException:
|
||||
current_app.logger.exception(f"Email notification {notification_id} failed")
|
||||
|
||||
Reference in New Issue
Block a user