mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Ensures that both the CSV processing and the API both use the new deliver_email and deliver_sms tasks not the old ones with the redundant parameter.
This commit is contained in:
@@ -46,7 +46,7 @@ from app.errors import (
|
||||
)
|
||||
|
||||
register_errors(notifications)
|
||||
from app.celery.provider_tasks import send_sms_to_provider, send_email_to_provider
|
||||
from app.celery import provider_tasks
|
||||
|
||||
|
||||
@notifications.route('/notifications/email/ses', methods=['POST'])
|
||||
@@ -342,9 +342,9 @@ def persist_notification(
|
||||
|
||||
try:
|
||||
if notification_type == SMS_TYPE:
|
||||
send_sms_to_provider.apply_async((str(service.id), str(notification_id)), queue='send-sms')
|
||||
provider_tasks.deliver_sms.apply_async((str(notification_id)), queue='send-sms')
|
||||
if notification_type == EMAIL_TYPE:
|
||||
send_email_to_provider.apply_async((str(service.id), str(notification_id)), queue='send-email')
|
||||
provider_tasks.deliver_email.apply_async((str(notification_id)), queue='send-email')
|
||||
except Exception as e:
|
||||
current_app.logger.exception("Failed to send to SQS exception", e)
|
||||
dao_delete_notifications_and_history_by_id(notification_id)
|
||||
|
||||
Reference in New Issue
Block a user