From 2c7521d4149ca392f07fdb4959c8863f7e5397c5 Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期三, 15 四月 2020 20:08:47 +0800
Subject: [PATCH] test upsw vir

---
 controllers/swfsControllers.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/controllers/swfsControllers.go b/controllers/swfsControllers.go
index 475efc0..a52ec64 100644
--- a/controllers/swfsControllers.go
+++ b/controllers/swfsControllers.go
@@ -120,7 +120,9 @@
 func UpdateAllNodesScriptArgument(nowPeers []interface{}) {
 	for _, val := range nowPeers {
 		ip := val.(string)
+		fmt.Println("ip: ", ip)
 		url := "http://" + ip + ":7020/node/api-v/swfs/updateSWFSService"
+		fmt.Println("url", url)
 		http.Get(url)
 	}
 }
@@ -249,6 +251,7 @@
 func AsMaster() bool {
 	AddNewMasterToPeers()
 	nowPeers := GetNowPeersList()
+	fmt.Println("nowPeers: ", nowPeers)
 	RequestMasterNodesOperation(nowPeers)
 	return true
 }
@@ -287,7 +290,7 @@
 //鍚戦泦缇ゅ姞鍏ユ柊鐨刴aster
 func AddNewMasterToPeers() (result bool) {
 	peer := config.Server.EsServerIp + ":6333"
-	addUrl := "http://" + config.Server.EsServerIp + ":" + config.Server.EsServerPort + "/" + config.BasicFS.IndexName + "/_update_by_query"
+	addUrl := "http://" + config.Server.EsServerIp + ":" + config.Server.EsServerPort + "/" + config.BasicFS.IndexName + "/_update_by_query?refresh=true"
 	addJson := `{
     "script": {
         "lang": "painless",

--
Gitblit v1.8.0