feat: support add redis queue with alarm/nbi_pm/nbi_kpi, support generate all nbi pm data

This commit is contained in:
simon
2025-08-11 17:10:13 +08:00
parent d4923d008c
commit 46ccc0ab83
26 changed files with 14059 additions and 41 deletions

View File

@@ -450,6 +450,12 @@ func PostAlarmFromNF(w http.ResponseWriter, r *http.Request) {
services.ResponseInternalServerError500DatabaseOperationFailed(w)
continue
}
// 推送到 redis 队列, for NBI ARALM notification
err = redisqueue.AddAlarmQueue(alarmData.AlarmId)
if err != nil {
log.Warn("Failed to AddAlarmQueue:", err)
}
}
alarmLog := new(AlarmLog)
alarmLog.NeType = alarmData.NeType
@@ -779,6 +785,11 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
log.Error("Failed to insert alarm:", err)
continue
}
// 推送到 redis 队列, for NBI ARALM notification
err = redisqueue.AddAlarmQueue(alarmData.AlarmId)
if err != nil {
log.Warn("Failed to AddAlarmQueue:", err)
}
}
if err == nil && affected > 0 {
alarmLog := new(AlarmLog)