| | |
| | | |
| | | import ( |
| | | "basic.com/pubsub/protomsg.git" |
| | | "basic.com/valib/logger.git" |
| | | "github.com/knetic/govaluate" |
| | | "plugin" |
| | | "ruleprocess/cache" |
| | | "ruleprocess/structure" |
| | | "ruleprocess/logger" |
| | | "ruleprocess/structure" |
| | | "sort" |
| | | "strconv" |
| | | "strings" |
| | | "sync" |
| | | "time" |
| | | |
| | | "basic.com/pubsub/protomsg.git" |
| | | "github.com/knetic/govaluate" |
| | | ) |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | //logger.Debug("------locations的内容:", locations) |
| | | logger.Debug("------locations的内容:", locations) |
| | | var islink bool |
| | | if groupRule.SetType == "linkTask" { |
| | | islink = true |
| | |
| | | |
| | | // 如果有持续时间条件维护开启一个定时器 |
| | | func duration(rule *protomsg.Rule, groupId string, am *structure.AreaMap, args *structure.SdkDatas, message *protomsg.SdkMessage) string{ |
| | | cacheId := "" |
| | | if rule.PolygonId == am.AreaId { // 首先规则所对应的区域id要跟区域数据的id对的上 配置的算法要对的上 |
| | | if rule.SdkArgAlias == "duration" { // |
| | | //logger.Info("当前小规则是:---------", rule) |