Browse Source

配置修改-测试207

zhengkun 3 years ago
parent
commit
010020d114
4 changed files with 15 additions and 10 deletions
  1. 2 2
      src/config.json
  2. 4 0
      src/front/quality.go
  3. 6 5
      src/util/config.go
  4. 3 3
      src/web/qua_res/qua_config.json

+ 2 - 2
src/config.json

@@ -1,8 +1,8 @@
 {
     "port": "7000",
-    "mgodb": "127.0.0.1:27017",
+    "mgodb": "192.168.3.207:27092",
     "dbsize": 10,
-    "dbname": "zhengkun",
+    "dbname": "datavalidation",
     "alltocoll": "marked",
     "bidding":{
         "addr":"192.168.3.207:27092",

+ 4 - 0
src/front/quality.go

@@ -49,6 +49,10 @@ func QuaFieldScore(field_tag []string,coll_name string) bool {
 		u.Mgo.UpSertBulk(coll_name, updateFieldScore...)
 	}
 	log.Printf("处理耗时:%d秒~数量:%d个\n", int(time.Now().Unix())-start,total)
+
+	if total <= 0 {
+		return false
+	}
 	return true
 }
 

+ 6 - 5
src/util/config.go

@@ -36,11 +36,11 @@ var (
 
 
 var (
-	Qy_Es                  					*elastic.Elastic //企业es
-	Mgo_QY									*mongodb.MongodbSim
-	Qy_Lock 								sync.Mutex         	   //锁
+	Qy_Es                  					*elastic.Elastic 		//企业es
+	Mgo_QY									*mongodb.MongodbSim		//企业mgo
+	Qy_Lock 								sync.Mutex         	   	//锁-多线程备用
 	Ext_Type,Ext_From						map[string]interface{}	//抽取来源,方式分
-	Buyer_Score,S_Winner_Score				map[string]interface{}
+	Buyer_Score,S_Winner_Score				map[string]interface{}	//字段规则分
 	Budget_Score,Bidamount_Score			map[string]interface{}
 	Projectname_Score,Projectcode_Score		map[string]interface{}
 )
@@ -128,6 +128,7 @@ func InitConfig() {
 
 //质量相关初始化配置
 func initQuaConfig()  {
+	//线上-需替换-172.17.145.163:27083,172.17.4.187:27082,
 	qyxyconf := Quaconfig["qy_mongodb"].(map[string]interface{})
 	Mgo_QY = &mongodb.MongodbSim{
 		MongodbAddr: qyxyconf["qy_addrName"].(string),
@@ -138,7 +139,7 @@ func initQuaConfig()  {
 	}
 	Mgo_QY.InitPool()
 
-	//查询企业库-可使用es - 也可以mongo
+	//查询企业库-可使用es - 也可以mongo  http://172.17.145.170:9800
 	//Qy_Es = &elastic.Elastic{
 	//	S_esurl: qu.ObjToString(Quaconfig["qyxy_es"]),
 	//	I_size:  10,

+ 3 - 3
src/web/qua_res/qua_config.json

@@ -1,11 +1,11 @@
 {
-  "qyxy_es":"http://127.0.0.1:12003",
+  "qyxy_es":"http://172.17.145.170:9800",
   "qy_mongodb": {
-    "qy_addrName": "127.0.0.1:27017",
+    "qy_addrName": "192.168.3.207:27092",
     "qy_dbName": "mixdata",
     "qy_username": "",
     "qy_password": "",
-    "qy_pool": 10
+    "qy_pool": 5
   },
   "ext_from": {
     "title": 98,