This commit is contained in:
2023-09-27 18:01:52 +08:00
parent 2050ab99a9
commit 7cba553884

View File

@@ -484,14 +484,23 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
body := response.Body()
log.Debug("Request body:", string(body))
alarmArray := new([]Alarm)
_ = json.Unmarshal(body, &alarmArray)
err = json.Unmarshal(body, &alarmArray)
if err != nil {
log.Error("Failed to Unmarshal:", err)
//services.ResponseInternalServerError500ProcessError(w, err)
continue
}
valueJson, err := dborm.XormGetAAConfig()
if err != nil {
log.Error("Failed to XormGetAAConfig:", err)
//services.ResponseInternalServerError500ProcessError(w, err)
continue
}
if alarmArray == nil {
log.Info("Not found sync alarms, neType=%s, neId=%s", ne.NeType, ne.NeId)
//services.ResponseInternalServerError500ProcessError(w, err)
continue
}
// session := xEngine.NewSession()
// defer session.Close()
var activeAlarmNum int = 0