This commit is contained in:
XM-GO
2023-08-22 15:17:14 +08:00
parent 85f4f328f4
commit 4344771547
143 changed files with 13004 additions and 6957 deletions

View File

@@ -1,8 +1,9 @@
package nodes
import (
"pandax/apps/visual/entity"
"pandax/apps/visual/services"
"pandax/apps/rule/entity"
"pandax/apps/rule/services"
"pandax/pkg/global"
"pandax/pkg/rule_engine/message"
)
@@ -36,13 +37,14 @@ func (n *logNode) Handle(msg message.Message) error {
return err
}
}
services.VisualRuleChainMsgLogModelDao.Insert(entity.VisualRuleChainMsgLog{
services.RuleChainMsgLogModelDao.Insert(entity.RuleChainMsgLog{
MessageId: msg.GetId(),
MsgType: msg.GetType(),
DeviceName: msg.GetMetadata().GetValues()["deviceName"].(string),
Ts: msg.GetTs(),
Content: logMessage,
})
global.Log.Info(logMessage)
if err != nil {
if failureLableNode != nil {
return failureLableNode.Handle(msg)