Allow CBC proxy client to take channel

This moves the hardcoding to test channels one step up to where we call
`create_and_send_broadcast`

We can then after this, start to differ whether we give it the 'test' or
'severe' channel based on the services channel setting.
This commit is contained in:
David McDonald
2021-01-29 11:54:12 +00:00
parent 91f5be835a
commit 2aad3163e6
4 changed files with 27 additions and 13 deletions

View File

@@ -59,6 +59,7 @@ def send_broadcast_provider_message(broadcast_event_id, provider):
areas=areas,
sent=broadcast_event.sent_at_as_cap_datetime_string,
expires=broadcast_event.transmitted_finishes_at_as_cap_datetime_string,
channel="test"
)
elif broadcast_event.message_type == BroadcastEventMessageType.UPDATE:
cbc_proxy_provider_client.update_and_send_broadcast(
@@ -70,6 +71,7 @@ def send_broadcast_provider_message(broadcast_event_id, provider):
previous_provider_messages=broadcast_event.get_earlier_provider_messages(provider),
sent=broadcast_event.sent_at_as_cap_datetime_string,
expires=broadcast_event.transmitted_finishes_at_as_cap_datetime_string,
channel="test"
)
elif broadcast_event.message_type == BroadcastEventMessageType.CANCEL:
cbc_proxy_provider_client.cancel_broadcast(