@@ -47,79 +47,6 @@ def update_action_status_for_sentry_app_installation(
4747 dataconditiongroupaction__condition_group__organization_id = organization_id ,
4848 ).update (status = status )
4949
50- def update_action_status_for_sentry_app_via_uuid (
51- self ,
52- * ,
53- organization_id : int ,
54- status : int ,
55- sentry_app_install_uuid : str | None = None ,
56- sentry_app_id : int | None = None ,
57- ) -> None :
58- sentry_app_id_actions = Action .objects .none ()
59- installation_uuid_actions = Action .objects .none ()
60-
61- if sentry_app_id :
62- sentry_app_id_actions = Action .objects .filter (
63- config__sentry_app_identifier = SentryAppIdentifier .SENTRY_APP_ID ,
64- config__target_identifier = str (sentry_app_id ),
65- type = Action .Type .SENTRY_APP ,
66- dataconditiongroupaction__condition_group__organization_id = organization_id ,
67- )
68- if sentry_app_install_uuid :
69- installation_uuid_actions = Action .objects .filter (
70- config__sentry_app_identifier = SentryAppIdentifier .SENTRY_APP_INSTALLATION_UUID ,
71- config__target_identifier = sentry_app_install_uuid ,
72- type = Action .Type .SENTRY_APP ,
73- dataconditiongroupaction__condition_group__organization_id = organization_id ,
74- )
75-
76- actions = sentry_app_id_actions | installation_uuid_actions
77- if actions :
78- actions .update (status = status )
79-
80- def update_action_status_for_sentry_app_via_uuid__region (
81- self ,
82- * ,
83- region_name : str ,
84- status : int ,
85- sentry_app_install_uuid : str | None = None ,
86- organization_id : int | None = None ,
87- sentry_app_id : int | None = None ,
88- ) -> None :
89- sentry_app_id_actions = Action .objects .none ()
90- installation_uuid_actions = Action .objects .none ()
91-
92- if not sentry_app_id and not organization_id :
93- logger .info (
94- "Expected sentry_app_id and organization_id, but they were not passed" ,
95- extra = {"sentry_app_id" : sentry_app_id , "organization_id" : organization_id },
96- )
97-
98- if sentry_app_id and organization_id :
99- sentry_app_id_actions = Action .objects .filter (
100- config__sentry_app_identifier = SentryAppIdentifier .SENTRY_APP_ID ,
101- config__target_identifier = str (sentry_app_id ),
102- type = Action .Type .SENTRY_APP ,
103- dataconditiongroupaction__condition_group__organization_id = organization_id ,
104- )
105- if sentry_app_install_uuid and organization_id :
106- installation_uuid_actions = Action .objects .filter (
107- config__target_identifier = sentry_app_install_uuid ,
108- type = Action .Type .SENTRY_APP ,
109- config__sentry_app_identifier = SentryAppIdentifier .SENTRY_APP_INSTALLATION_UUID ,
110- dataconditiongroupaction__condition_group__organization_id = organization_id ,
111- )
112- elif sentry_app_install_uuid :
113- installation_uuid_actions = Action .objects .filter (
114- config__target_identifier = sentry_app_install_uuid ,
115- type = Action .Type .SENTRY_APP ,
116- config__sentry_app_identifier = SentryAppIdentifier .SENTRY_APP_INSTALLATION_UUID ,
117- )
118-
119- actions = sentry_app_id_actions | installation_uuid_actions
120- if actions :
121- actions .update (status = status )
122-
12350 def update_action_status_for_sentry_app_via_sentry_app_id (
12451 self ,
12552 * ,
0 commit comments