mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
add CBC_PROXY_ENABLED config flag to control if tasks are triggered
previously we made some incorrect assumptions about set-up on staging and prod - they currently don't have any cbc_proxy aws creds at all. We shoudn't be attempting canaries or link tests when there's no AWS infrastructure to connect to. We also shouldn't bother writing a row into the database at all for the broadcast_provider_message since we're not even attempting to send, and we shouldn't get confused between messages that failed and messages we never wanted to send at all.
This commit is contained in:
@@ -30,7 +30,7 @@ class CBCProxyClient:
|
||||
_lambda_client = None
|
||||
|
||||
def init_app(self, app):
|
||||
if app.config.get('CBC_PROXY_AWS_ACCESS_KEY_ID'):
|
||||
if app.config.get('CBC_PROXY_ENABLED'):
|
||||
self._lambda_client = boto3.client(
|
||||
'lambda',
|
||||
region_name='eu-west-2',
|
||||
|
||||
Reference in New Issue
Block a user