mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 16:48:31 -04:00
Add docs/code comments for message send flow
This commit is contained in:
@@ -22,6 +22,11 @@ from app.serialised_models import SerialisedService, SerialisedTemplate
|
||||
|
||||
|
||||
def send_sms_to_provider(notification):
|
||||
'''
|
||||
This is the last step in the message send flow.
|
||||
We get necessary data for recipient, template,
|
||||
notification and send it off to the provider.
|
||||
'''
|
||||
# we no longer store the personalisation in the db,
|
||||
# need to retrieve from s3 before generating content
|
||||
# However, we are still sending the initial verify code through personalisation
|
||||
@@ -41,6 +46,7 @@ def send_sms_to_provider(notification):
|
||||
return
|
||||
|
||||
if notification.status == NotificationStatus.CREATED:
|
||||
# We get the provider here (which is only aws sns)
|
||||
provider = provider_to_use(NotificationType.SMS, notification.international)
|
||||
if not provider:
|
||||
technical_failure(notification=notification)
|
||||
|
||||
Reference in New Issue
Block a user