| | |
| | | var serverIp,serverPort,dbTablePersons string |
| | | type conf struct { |
| | | PhotoUrl string `yaml:"photoUrl"` |
| | | Videopersons string `yaml:"videopersons"` |
| | | Personaction string `yaml:"personaction"` |
| | | Videopersons string `yaml:"videoPersons"` |
| | | Personaction string `yaml:"personAction"` |
| | | Serverip string `yaml:"serverIp"` |
| | | Serverport string `yaml:"serverPort"` |
| | | Dbtablepersons string `yaml:"dbTablePersons"` |
| | | } |
| | | func init() { |
| | | func Init() { |
| | | data, err := ioutil.ReadFile("./config/conf.yml") |
| | | if err != nil { |
| | | fmt.Println("读取配置文件出错--", err) |
| | |
| | | serverIp = c.Serverip |
| | | serverPort = c.Serverport |
| | | dbTablePersons = c.Dbtablepersons |
| | | localConfig, err := cache.GetServerInfo() |
| | | if err != nil { |
| | | localConfig, err1 := cache.GetServerInfo() |
| | | if err1 != nil { |
| | | logger.Error("查询本机信息失败!") |
| | | } |
| | | logger.Debug("本机信息:",localConfig) |
| | |
| | | |
| | | // 给目标填充liker |
| | | func (arg *Arg) fillLiker(tableId []string,compareThreshold float32) { |
| | | fmt.Println("---------------------------------看看那三个混蛋:",dbTablePersons,serverIp,serverPort) |
| | | bytes := bigCache.GetComparePersonBaseInfo(tableId,arg.Feature,compareThreshold) |
| | | var m map[string]float32 |
| | | err1 := json.Unmarshal(bytes, &m) |