mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Ensure that aws ses stub client is not run in production
This commit is contained in:
committed by
David McDonald
parent
6422a88c8c
commit
8b7a0b88cb
@@ -88,10 +88,10 @@ def create_app(application):
|
||||
aws_ses_stub_client.init_app(
|
||||
application.config['AWS_REGION'],
|
||||
statsd_client=statsd_client,
|
||||
stub_url=os.environ.get('SES_STUB_URL')
|
||||
stub_url=application.config['SES_STUB_URL']
|
||||
)
|
||||
# If a stub url is provided for SES, then use the stub client rather than the real SES boto client
|
||||
email_clients = [aws_ses_client] if not os.environ.get('SES_STUB_URL') else [aws_ses_stub_client]
|
||||
email_clients = [aws_ses_stub_client] if application.config['SES_STUB_URL'] else [aws_ses_client]
|
||||
clients.init_app(sms_clients=[firetext_client, mmg_client], email_clients=email_clients)
|
||||
|
||||
notify_celery.init_app(application)
|
||||
|
||||
Reference in New Issue
Block a user