From 847da9b0c6f0719cf2b4acb17dbff122feb6c508 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 04 十二月 2019 18:05:51 +0800
Subject: [PATCH] fix
---
service/FaceCompareService.go | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/service/FaceCompareService.go b/service/FaceCompareService.go
index 04d5040..24aabde 100644
--- a/service/FaceCompareService.go
+++ b/service/FaceCompareService.go
@@ -8,9 +8,10 @@
"nanomsg.org/go-mangos/protocol/req"
"nanomsg.org/go-mangos/transport/ipc"
"nanomsg.org/go-mangos/transport/tcp"
+ "strconv"
"sync"
"webserver/extend/config"
- "webserver/extend/logger"
+ "basic.com/valib/logger.git"
)
type FaceCompareService struct {
@@ -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