From 33a8935a188127f7624b4c17c6d40c7a500c170f Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期三, 30 十月 2019 17:18:41 +0800 Subject: [PATCH] 取消推送,看看占内存发生在何处 --- ruleserver/personTrack.go | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruleserver/personTrack.go b/ruleserver/personTrack.go index a330231..dc69af8 100644 --- a/ruleserver/personTrack.go +++ b/ruleserver/personTrack.go @@ -3,7 +3,8 @@ import ( "basic.com/pubsub/protomsg.git" "github.com/golang/protobuf/proto" - "ruleprocess/logger" + "basic.com/valib/logger.git" + "ruleprocess/structure" ) var TrackPond = make(map[string]*PersonTrack) @@ -104,8 +105,8 @@ return false } func TrackOrNot(label map[string]interface{}) bool{ - if label["yolo"] != nil && len(label["yolo"].([]Result)) > 0 { - for _,res := range label["yolo"].([]Result) { + if label["yolo"] != nil && len(label["yolo"].([]structure.Result)) > 0 { + for _,res := range label["yolo"].([]structure.Result) { if res.TimeLabel == "10" { return true } @@ -115,7 +116,7 @@ } // 杩囨护鎺夐偅浜涘凡鍦ㄧ紦瀛樹腑涓斿垎鍊兼洿浣庣殑浜鸿劯锛屾洿鏂扮紦瀛橈紙娌℃湁鐨勫姞涓婏紝鍒嗗�兼洿鏂颁负鏇撮珮鐨勶紝澶氱殑鍒犻櫎锛� -func FaceIsInPond(cameraId string, sdkinfor *protomsg.SdkmsgWithTask) string { +func FaceIsInPond(cameraId string, sdkinfor *protomsg.SdkmsgWithTask) { if TrackPond[cameraId] != nil { logger.Info("----椹墠鐐細", TrackPond[cameraId], "=====", len(TrackPond[cameraId].Faces)) for _,face := range TrackPond[cameraId].Faces { @@ -183,7 +184,6 @@ } } } else { - return "false" + TrackPond[cameraId] = &PersonTrack{Faces: nil} } - return "false" } -- Gitblit v1.8.0