feat: support add redis queue with alarm/nbi_pm/nbi_kpi, support generate all nbi pm data
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user