Skip to content

Commit 62b717c

Browse files
author
Cairry
committed
♻️ Remove alarm subscribe support
1 parent 4610387 commit 62b717c

File tree

2 files changed

+0
-132
lines changed

2 files changed

+0
-132
lines changed

alert/consumer/consumer.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -273,31 +273,13 @@ func (c *Consume) sendAlerts(faultCenter models.FaultCenter, aggEvents *AlertGro
273273
// processAlertGroup 处理告警组
274274
func (c *Consume) processAlertGroup(faultCenter models.FaultCenter, noticeId string, alerts []*models.AlertCurEvent) {
275275
g := new(errgroup.Group)
276-
g.Go(func() error { return c.handleSubscribe(alerts) })
277276
g.Go(func() error { return handleAlert(c.ctx, "alarm", faultCenter, noticeId, alerts) })
278277

279278
if err := g.Wait(); err != nil {
280279
logc.Errorf(c.ctx.Ctx, "Alert group processing failed: %v", err)
281280
}
282281
}
283282

284-
// handleSubscribe 处理订阅逻辑
285-
func (c *Consume) handleSubscribe(alerts []*models.AlertCurEvent) error {
286-
g := new(errgroup.Group)
287-
for _, event := range alerts {
288-
event := event
289-
g.Go(func() error {
290-
if err := processSubscribe(c.ctx, event); err != nil {
291-
return fmt.Errorf("failed to process subscribe: %v", err)
292-
}
293-
294-
return nil
295-
})
296-
}
297-
298-
return g.Wait()
299-
}
300-
301283
// removeAlertFromCache 从缓存中删除告警
302284
func (c *Consume) removeAlertFromCache(alert *models.AlertCurEvent) {
303285
c.ctx.Redis.Alert().RemoveAlertEvent(alert.TenantId, alert.FaultCenterId, alert.Fingerprint)

alert/consumer/subscribe.go

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)