From 7db688079aa8ebf2ad495f0788517653c3984f52 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期一, 16 九月 2019 15:55:26 +0800 Subject: [PATCH] use one config with other proc --- service/FaceCompareService.go | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/service/FaceCompareService.go b/service/FaceCompareService.go index 67e8eb8..24aabde 100644 --- a/service/FaceCompareService.go +++ b/service/FaceCompareService.go @@ -8,6 +8,7 @@ "nanomsg.org/go-mangos/protocol/req" "nanomsg.org/go-mangos/transport/ipc" "nanomsg.org/go-mangos/transport/tcp" + "strconv" "sync" "webserver/extend/config" "basic.com/valib/logger.git" @@ -66,13 +67,13 @@ func (sv *FaceCompareService) CompareVideoPersons() *CompareList{ sv.CompareArgs.TableIds = []string { CaptureTable } b, err := proto.Marshal(&sv.CompareArgs) - esCompServerList := config.EsCompServerInfo.Url + esCompServerList := config.EsCompServerInfo.Ips logger.Debug("compServerList:", esCompServerList) //1.鍚戝悇涓狤s compare杩涚▼鍙戣捣璇锋眰鎷垮埌姣斿缁撴灉 var resultList CompareList for _,str :=range esCompServerList{ - reqUrl := "tcp://"+str + reqUrl := "tcp://"+str + ":"+strconv.Itoa(config.EsCompServerInfo.Port) resultB := doCompareRequest(reqUrl,b) if resultB == nil || len(*resultB) ==0 { continue @@ -98,12 +99,12 @@ //姣斿搴曞簱 func (sv *FaceCompareService) CompareDbPersons() *CompareList{ b, err := proto.Marshal(&sv.CompareArgs) - dbPersonCompServerUrl := config.DbPersonCompInfo.Url + dbPersonCompServerUrl := config.DbPersonCompInfo.Ip logger.Debug("comp Server url:", dbPersonCompServerUrl) var resultList CompareList - reqUrl := "tcp://"+dbPersonCompServerUrl + reqUrl := "tcp://"+dbPersonCompServerUrl+":"+strconv.Itoa(config.DbPersonCompInfo.Port) resultB := doCompareRequest(reqUrl,b) if resultB == nil || len(*resultB) ==0 { return nil -- Gitblit v1.8.0