fix: remove some debug of generate ne state alarm
This commit is contained in:
@@ -110,7 +110,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
failClearAlarmNum := 0
|
failClearAlarmNum := 0
|
||||||
|
|
||||||
for _, ne := range nes {
|
for _, ne := range nes {
|
||||||
log.Debug("ne:", ne)
|
//log.Debug("ne:", ne)
|
||||||
|
|
||||||
sql := fmt.Sprintf("select * from ne_state where ne_type = '%s' and ne_id = '%s' order by timestamp desc limit 1", ne.NeType, ne.NeId)
|
sql := fmt.Sprintf("select * from ne_state where ne_type = '%s' and ne_id = '%s' order by timestamp desc limit 1", ne.NeType, ne.NeId)
|
||||||
neState, err := dborm.XormGetDataBySQL(sql)
|
neState, err := dborm.XormGetDataBySQL(sql)
|
||||||
@@ -122,7 +122,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
log.Warn("Not found record in ne_state:")
|
log.Warn("Not found record in ne_state:")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Debug("neState:", *neState)
|
//log.Debug("neState:", *neState)
|
||||||
|
|
||||||
// params := "10000"
|
// params := "10000"
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
log.Error("Failed to get alarm:", err)
|
log.Error("Failed to get alarm:", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Debug("alarm:", *alarm)
|
//log.Debug("alarm:", *alarm)
|
||||||
|
|
||||||
var timestamp string
|
var timestamp string
|
||||||
if len(*neState) == 0 {
|
if len(*neState) == 0 {
|
||||||
@@ -197,7 +197,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
|
|
||||||
alarmArray := &[]Alarm{*alarmData}
|
alarmArray := &[]Alarm{*alarmData}
|
||||||
body, _ := json.Marshal(alarmArray)
|
body, _ := json.Marshal(alarmArray)
|
||||||
log.Debug("body: ", string(body))
|
//log.Debug("body: ", string(body))
|
||||||
|
|
||||||
var response *resty.Response
|
var response *resty.Response
|
||||||
requestURI := fmt.Sprintf("/api/rest/faultManagement/v1/elementType/%s/objectType/alarms", ne.NeType)
|
requestURI := fmt.Sprintf("/api/rest/faultManagement/v1/elementType/%s/objectType/alarms", ne.NeType)
|
||||||
@@ -264,7 +264,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
|||||||
|
|
||||||
alarmArray := &[]Alarm{*alarmData}
|
alarmArray := &[]Alarm{*alarmData}
|
||||||
body, _ := json.Marshal(alarmArray)
|
body, _ := json.Marshal(alarmArray)
|
||||||
log.Debug("body: ", string(body))
|
//log.Debug("body: ", string(body))
|
||||||
|
|
||||||
var response *resty.Response
|
var response *resty.Response
|
||||||
requestURI := fmt.Sprintf("/api/rest/faultManagement/v1/elementType/%s/objectType/alarms", ne.NeType)
|
requestURI := fmt.Sprintf("/api/rest/faultManagement/v1/elementType/%s/objectType/alarms", ne.NeType)
|
||||||
|
|||||||
Reference in New Issue
Block a user