浏览代码

删除日志

liuxiulin 5 天之前
父节点
当前提交
1fe580070a
共有 1 个文件被更改,包括 0 次插入5 次删除
  1. 0 5
      pkg/ruleEngine/nodes/temp_alarm_node.go

+ 0 - 5
pkg/ruleEngine/nodes/temp_alarm_node.go

@@ -137,10 +137,8 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 	// 判断设备类型
 
 	productKey := message.MetaData["product_key"].(string)
-	fmt.Printf("产品key:%s---------------\n", productKey)
 
 	if productKey != t.config.ProductKey && productKey != mainCode {
-		fmt.Printf("产品key匹配不正确返回false----------------\n")
 		return false
 	}
 
@@ -151,13 +149,11 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 	onlinereply := rpcs.ReplyGetDeviceOnlineStatus{}
 	err := server.RPCCallByName(nil, rpcs.DeviceManagerName, "DeviceManager.GetDeviceOnlineStatus", onlineargs, &onlinereply)
 	if err != nil || onlinereply.ClientIP == "" {
-		fmt.Printf("设备不在线返回false----------------\n")
 		return false
 	}
 
 	// 判断报警规则
 	if len(t.config.Rules) == 0 {
-		fmt.Printf("未匹配到报警规则返回false----------------\n")
 		return false
 	}
 
@@ -170,7 +166,6 @@ func (t *TempAlarmNode) evaluateConditions(message *protocol.Message) bool {
 	}
 	// 判断设备是否开机
 	if data["power"].(float64) == 0 {
-		fmt.Printf("未开机返回false----------------\n")
 		_ = deleteAlarm(deviceId)
 		return false
 	}