@@ -151,26 +151,32 @@ def update_status(group: Group, status_change: StatusChangeMessageData) -> None:
151
151
152
152
This is used to trigger the `workflow_engine` processing status changes.
153
153
"""
154
- logger .info (
155
- "group.update_status.activity_type" ,
156
- extra = {** log_extra , "activity_type" : activity_type .value , "group_id" : group .id },
157
- )
158
154
latest_activity = (
159
155
Activity .objects .filter (group_id = group .id , type = activity_type .value )
160
156
.order_by ("-datetime" )
161
157
.first ()
162
158
)
163
- logger .info (
164
- "group.update_status.latest_activity" ,
165
- extra = {** log_extra , "latest_activity" : latest_activity , "group_id" : group .id },
166
- )
167
159
if latest_activity is not None :
168
160
metrics .incr (
169
161
"workflow_engine.issue_platform.status_change_handler" ,
170
162
amount = len (group_status_update_registry .registrations .keys ()),
171
163
tags = {"activity_type" : activity_type .value },
172
164
)
165
+ logger .info (
166
+ "group.status_change.activity_created" ,
167
+ extra = {
168
+ "group_id" : group .id ,
169
+ "activity_type" : activity_type ,
170
+ },
171
+ )
173
172
for handler in group_status_update_registry .registrations .values ():
173
+ logger .info (
174
+ "group.status_change.activity_created.handler" ,
175
+ extra = {
176
+ "group_id" : group .id ,
177
+ "activity_type" : activity_type ,
178
+ },
179
+ )
174
180
handler (group , status_change , latest_activity )
175
181
176
182
0 commit comments