liuxiaolong
2019-11-13 f26a0cab5bca17b7eab57f6330e576271e17a17f
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.向各个Es 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