panlei
2019-11-07 59dcc2bba3b294b2679beb4f177b835552798ed5
ruleserver/ruleToformula.go
@@ -224,7 +224,10 @@
               if ipcId == sdkData.IpcId {
                  for _, areaMap := range sdkData.AreaMapList {
                     // 去开启一个定时器
                     cacheId = duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message)
                     cacheid := duration(groupRule.Rules[j], groupRule.GroupId, areaMap, args, message)
                     if cacheid != "" {
                        cacheId = cacheid
                     }
                  }
               }
            }
@@ -286,11 +289,9 @@
               labelTypes = append(labelTypes,1)
            }
            // 给持续时间的第一张赋予缓存数据(遍历复制)
            logger.Info("缓存id为:",cacheId)
            if cacheId != "" { // 有这帧数据的缓存
               tempMap := make(map[string]interface{})
               for k, result := range args.RuleResult {
                  logger.Info("缓存key为:",k)
                  if k == "yolo" {
                     tempMap[k] = []structure.Result{}
                     for _, res := range result.([]structure.Result) {
@@ -304,7 +305,6 @@
                     }
                  }
               }
               logger.Info("缓存规则为:",tempMap)
               rw.Lock()
               TimeEleList[cacheId].CacheSdkData.RuleResult = tempMap
               rw.Unlock()