| | |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/valib/logger.git" |
| | | "github.com/knetic/govaluate" |
| | | "ruleprocess/ruleserver" |
| | | "ruleprocess/structure" |
| | | "strconv" |
| | | "time" |
| | | ) |
| | | |
| | | func PushSomthing (msg structure.ResultMsg) { |
| | | // 如果标签中含有持续时间首次报警的timeLabel的话则不需要过人体追踪,不然就没的插入了 |
| | | fk := ruleserver.TrackOrNot(msg.RuleResult) |
| | | if fk { |
| | | Judge(msg) |
| | | } else { |
| | | flag := ruleserver.BodyIsSame(msg.SdkMessage) |
| | | if !flag { |
| | | Judge(msg) |
| | | } |
| | | } |
| | | } |
| | | func Judge(msg structure.ResultMsg) { |
| | | func PushSomthing(msg structure.ResultMsg) { |
| | | defer func() { |
| | | if err := recover(); err != nil { |
| | | logger.Error("事件推送模块儿的异常捕获:",err) |