send messages to multiple providers

at the moment only EE is enabled (this is set in app.config, but also,
only EE have a function defined for them so even if another provider was
enabled without changing the dict in cbc_proxy.py we won't trigger
anything). this commit just adds wrapper tasks that check what providers
are enabled, and invokes the send function for each provider.

The send function doesn't currently distinguish between providers for
now - as we only have EE set up. in the future we'll want to separate
the cbc_proxy_client into separate clients for separate providers.
Different providers have different lambda functions, and have different
requirements. For example, we know that the two different CBC software
solutions handle references to previous messages differently.
This commit is contained in:
Leo Hemsted
2020-10-29 11:12:28 +00:00
parent 2e665de46d
commit bc3512467b
4 changed files with 57 additions and 21 deletions

View File

@@ -367,6 +367,9 @@ class Config(object):
CBC_PROXY_AWS_ACCESS_KEY_ID = os.environ.get('CBC_PROXY_AWS_ACCESS_KEY_ID', '')
CBC_PROXY_AWS_SECRET_ACCESS_KEY = os.environ.get('CBC_PROXY_AWS_SECRET_ACCESS_KEY', '')
# matches up with the strings in models.py::BroadcastProvider
ENABLED_CBCS = ['ee']
######################
# Config overrides ###