Skip to content

Commit b6f6732

Browse files
author
David Wang
authored
ref(crons): Use new broken monitor notif setting (#74416)
After #74415 is merged, let's go ahead and switch over to using the new notification setting.
1 parent ce66546 commit b6f6732

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sentry/monitors/tasks/detect_broken_monitor_envs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def get_user_emails_from_monitor(monitor: Monitor, project: Project):
115115
user_ids = get_user_ids_to_notify_from_monitor(monitor, project)
116116
actors = [Actor.from_id(user_id=id) for id in user_ids]
117117
recipients = notifications_service.get_notification_recipients(
118-
type=NotificationSettingEnum.APPROVAL,
118+
type=NotificationSettingEnum.BROKEN_MONITORS,
119119
recipients=actors,
120120
organization_id=project.organization_id,
121121
project_ids=[project.id],

tests/sentry/monitors/tasks/test_detect_broken_monitor_envs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def test_does_not_send_emails_to_users_with_disabled_nudges(self, mock_now, buil
614614
# Disable Nudges for this disabled_owner
615615
with assume_test_silo_mode(SiloMode.CONTROL):
616616
NotificationSettingOption.objects.create(
617-
type="approval",
617+
type="brokenMonitors",
618618
scope_type="user",
619619
scope_identifier=disabled_owner.id,
620620
user_id=disabled_owner.id,

0 commit comments

Comments
 (0)