initial sms provider cleanup

This commit is contained in:
Jim Moffet
2022-06-25 13:05:10 -07:00
parent b0f8a51f99
commit 2bcae20441
7 changed files with 26 additions and 16 deletions

View File

@@ -1,3 +1,5 @@
from celery import current_app
class ClientException(Exception):
'''
Base Exceptions for sending notifications that fail
@@ -36,7 +38,7 @@ class NotificationProviderClients(object):
def get_client_by_name_and_type(self, name, notification_type):
assert notification_type in ['email', 'sms']
if notification_type == 'email':
return self.get_email_client(name)

View File

@@ -20,11 +20,14 @@ class AwsSnsClient(SmsClient):
self.current_app = current_app
self.statsd_client = statsd_client
self.long_code_regex = re.compile(r"^\+1\d{10}$")
@property
def name(self):
return 'sns'
def get_name(self):
return 'sns'
def send_sms(self, to, content, reference, sender=None, international=False):
matched = False