notify-api-390

This commit is contained in:
Kenneth Kehl
2023-08-29 13:12:18 -07:00
parent 36f562d390
commit 29a280ced4
5 changed files with 93 additions and 15 deletions

View File

@@ -34,7 +34,13 @@ def check_sms_delivery_receipt(self, message_id, notification_id, sent_at):
failure appears in the cloudwatch logs, so this should keep retrying until the log appears, or until
we run out of retries.
"""
status, provider_response = aws_cloudwatch_client.check_sms(message_id, notification_id, sent_at)
# TODO the localstack version of cloudwatch doesn't have our log groups. Possibly create them with awslocal?
if aws_cloudwatch_client.is_localstack():
status = 'success'
provider_response = 'this is a fake successful localstack sms message'
else:
status, provider_response = aws_cloudwatch_client.check_sms(message_id, notification_id, sent_at)
if status == 'success':
status = NOTIFICATION_DELIVERED
elif status == 'failure':