( ctx context.Context, block TaskBlock, reconciled Task, actor ActorContext, )
| 165 | } |
| 166 | |
| 167 | func (m *Service) recordTaskBlockExpired( |
| 168 | ctx context.Context, |
| 169 | block TaskBlock, |
| 170 | reconciled Task, |
| 171 | actor ActorContext, |
| 172 | ) { |
| 173 | if eventErr := m.recordTaskEvent(ctx, block.TaskID, "", taskEventBlockExpired, actor, taskBlockExpiredPayload{ |
| 174 | Status: reconciled.Status, |
| 175 | BlockID: strings.TrimSpace(block.ID), |
| 176 | BlockKind: block.Kind.Normalize(), |
| 177 | Reason: redactTaskSecretText(strings.TrimSpace(block.Reason)), |
| 178 | ExpiresAt: block.ExpiresAt, |
| 179 | ClearedAt: block.ClearedAt, |
| 180 | }); eventErr != nil { |
| 181 | m.logTaskBlockEventFailure(eventErr, taskEventBlockExpired, block, "") |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func (m *Service) logTaskBlockEventFailure(err error, eventType string, block TaskBlock, runID string) { |
| 186 | slog.Error( |
no test coverage detected