fix: 历史告警同步判断存在错误
This commit is contained in:
@@ -595,7 +595,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
exist, err := session.Table("alarm").
|
exist, err := session.Table("alarm").
|
||||||
Where("ne_type=? and ne_id=? and alarm_id=? and alarm_status=1", alarmData.NeType, alarmData.NeId, alarmData.AlarmId).
|
Where("ne_type=? and ne_id=? and alarm_id=? and alarm_status=1", alarmData.NeType, alarmData.NeId, alarmData.AlarmId).
|
||||||
Exist()
|
Exist()
|
||||||
if err == nil || !exist {
|
if err != nil || !exist {
|
||||||
log.Infof("Not found active alarm: ne_id=%s, alarm_id=%s", alarmData.NeId, alarmData.AlarmId)
|
log.Infof("Not found active alarm: ne_id=%s, alarm_id=%s", alarmData.NeId, alarmData.AlarmId)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user