d
This commit is contained in:
@@ -484,14 +484,23 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
body := response.Body()
|
body := response.Body()
|
||||||
log.Debug("Request body:", string(body))
|
log.Debug("Request body:", string(body))
|
||||||
alarmArray := new([]Alarm)
|
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()
|
valueJson, err := dborm.XormGetAAConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to XormGetAAConfig:", err)
|
log.Error("Failed to XormGetAAConfig:", err)
|
||||||
//services.ResponseInternalServerError500ProcessError(w, err)
|
//services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
continue
|
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()
|
// session := xEngine.NewSession()
|
||||||
// defer session.Close()
|
// defer session.Close()
|
||||||
var activeAlarmNum int = 0
|
var activeAlarmNum int = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user