Don't raise P1 for broadcasts

This is happening on the AWS side now as part of
alphagov/notifications-broadcasts-infra#267 - but we still want to keep
the zendesk ticket as it contains useful context _and_ provides
visibility to the team.
This commit is contained in:
sakisv
2021-09-09 16:44:19 +03:00
parent 187e58d8ae
commit 65c21f694c

View File

@@ -58,7 +58,7 @@ def check_event_is_authorised_to_be_sent(broadcast_event, provider):
def check_event_makes_sense_in_sequence(broadcast_event, provider): def check_event_makes_sense_in_sequence(broadcast_event, provider):
""" """
If any previous event hasn't sent yet for that provider, then we shouldn't send the current event. Instead, fail and If any previous event hasn't sent yet for that provider, then we shouldn't send the current event. Instead, fail and
raise a P1 - so that a notify team member can assess the state of the previous messages, and if necessary, can raise a zendesk ticket - so that a notify team member can assess the state of the previous messages, and if necessary, can
replay the `send_broadcast_provider_message` task if the previous message has now been sent. replay the `send_broadcast_provider_message` task if the previous message has now been sent.
Note: This is called before the new broadcast_provider_message is created. Note: This is called before the new broadcast_provider_message is created.
@@ -128,7 +128,7 @@ def send_broadcast_event(broadcast_event_id):
broadcast_event.message_type == BroadcastEventMessageType.ALERT broadcast_event.message_type == BroadcastEventMessageType.ALERT
): ):
broadcast_message = broadcast_event.broadcast_message broadcast_message = broadcast_event.broadcast_message
# raise a P1 to alert team that broadcast is going out. # raise a zendesk ticket to alert team that broadcast is going out.
message = '\n'.join([ message = '\n'.join([
'Broadcast Sent', 'Broadcast Sent',
'', '',
@@ -146,7 +146,6 @@ def send_broadcast_event(broadcast_event_id):
subject="Live broadcast sent", subject="Live broadcast sent",
message=message, message=message,
ticket_type=zendesk_client.TYPE_INCIDENT, ticket_type=zendesk_client.TYPE_INCIDENT,
p1=True,
) )
current_app.logger.error(message) current_app.logger.error(message)