From 5018fec1d3ea2461c80615a98e9b8e43b47f9425 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期一, 13 一月 2020 10:51:38 +0800
Subject: [PATCH] debug

---
 run.go |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/run.go b/run.go
index d24d1e3..956247b 100644
--- a/run.go
+++ b/run.go
@@ -217,9 +217,7 @@
 	wg := &sync.WaitGroup{}
 
 	for _, msg := range msgs {
-		f.fnLogger("######Maintain :", msg.Cid)
 		f.chLife <- msg.Cid
-		f.fnLogger("######Maintain Over :", msg.Cid)
 
 		if c, ok := f.channelExist(msg.Cid); ok {
 			wg.Add(1)
@@ -233,15 +231,6 @@
 				continue
 			}
 
-			i := sdkhelper.UnpackImage(msg, f.typ, f.fnLogger)
-			if i == nil {
-				sdkhelper.EjectResult(nil, msg, out)
-				continue
-			}
-			// conv to bgr24 and resize
-			imgW, imgH := int(i.Width), int(i.Height)
-			ret := f.handle.TrackerResize(imgW, imgH, nc.index)
-			f.fnLogger("ResizeFaceTracker: cid: ", msg.Cid, " chan: ", nc.index, " wXh: ", imgW, "x", imgH, " result:", ret)
 			wg.Add(1)
 			go f.track(wg, &msg, nc.index, out)
 		}
@@ -255,8 +244,6 @@
 	defer wg.Done()
 
 	rMsg := *msg
-
-	f.fnLogger("######Recv From: ", rMsg.Cid, " Chan: ", tchan)
 
 	if !sdkhelper.ValidRemoteMessage(rMsg, f.typ, f.fnLogger) {
 		sdkhelper.EjectResult(nil, rMsg, out)
@@ -276,13 +263,12 @@
 	// conv to bgr24 and resize
 	imgW, imgH := int(i.Width), int(i.Height)
 
-	f.fnLogger("######Run cid:", rMsg.Cid, "chan: ", tchan)
-	count, data, _ := f.handle.Run(i.Data, imgW, imgH, 3, tchan)
-	f.fnLogger("######Over run cid:", rMsg.Cid, "chan: ", tchan)
+	ret := f.handle.TrackerResize(imgW, imgH, tchan)
+	f.fnLogger("ResizeFaceTracker: cid: ", msg.Cid, " chan: ", tchan, " wXh: ", imgW, "x", imgH, " result:", ret)
 
-	f.fnLogger("######Eject cid:", rMsg.Cid, "chan: ", tchan)
+	count, data, _ := f.handle.Run(i.Data, imgW, imgH, 3, tchan)
+
 	sdkhelper.EjectResult(data, rMsg, out)
-	f.fnLogger("######Over eject cid:", rMsg.Cid, "chan: ", tchan)
 
 	var id, name string
 	if rMsg.Tasklab != nil {

--
Gitblit v1.8.0