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
|
||||
|
||||
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)
|
||||
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:")
|
||||
continue
|
||||
}
|
||||
log.Debug("neState:", *neState)
|
||||
//log.Debug("neState:", *neState)
|
||||
|
||||
// params := "10000"
|
||||
|
||||
@@ -144,7 +144,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
||||
log.Error("Failed to get alarm:", err)
|
||||
continue
|
||||
}
|
||||
log.Debug("alarm:", *alarm)
|
||||
//log.Debug("alarm:", *alarm)
|
||||
|
||||
var timestamp string
|
||||
if len(*neState) == 0 {
|
||||
@@ -197,7 +197,7 @@ func (s *BarProcessor) Execute(data any) (any, error) {
|
||||
|
||||
alarmArray := &[]Alarm{*alarmData}
|
||||
body, _ := json.Marshal(alarmArray)
|
||||
log.Debug("body: ", string(body))
|
||||
//log.Debug("body: ", string(body))
|
||||
|
||||
var response *resty.Response
|
||||
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}
|
||||
body, _ := json.Marshal(alarmArray)
|
||||
log.Debug("body: ", string(body))
|
||||
//log.Debug("body: ", string(body))
|
||||
|
||||
var response *resty.Response
|
||||
requestURI := fmt.Sprintf("/api/rest/faultManagement/v1/elementType/%s/objectType/alarms", ne.NeType)
|
||||
|
||||
Reference in New Issue
Block a user