Add docs/code comments for message send flow

This commit is contained in:
Andrew Shumway
2024-03-18 11:32:29 -06:00
parent 8470c2568e
commit 5f2508a975
5 changed files with 53 additions and 10 deletions

View File

@@ -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)