From e74b50544622728a75f29d93cef4ea9c9d26f688 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期四, 16 四月 2020 11:31:47 +0800 Subject: [PATCH] uasa unit test --- controllers/swfsControllers.go | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/controllers/swfsControllers.go b/controllers/swfsControllers.go index cb6454c..cd4c6f0 100644 --- a/controllers/swfsControllers.go +++ b/controllers/swfsControllers.go @@ -122,7 +122,10 @@ fmt.Println("ip: ", ip) url := "http://" + ip + ":7020/node/api-v/swfs/updateSWFSService" fmt.Println("url", url) - http.Get(url) + resp, _ := http.Get(url) + if resp.StatusCode == 200 { + fmt.Println("璇锋眰瀹屾瘯", resp.StatusCode) + } } } @@ -200,11 +203,13 @@ //鏋勫缓閲嶅惎娴佺▼ func RestartAllServer(peersIp []string, coreBaseUnit int) { + fmt.Println("寮�濮嬫瀯寤洪噸鍚祦绋�") coreThread := len(peersIp)/coreBaseUnit + 1 masterIp := make([]string, 0) timeOut, _ := strconv.Atoi(config.Server.TimeOut) var waitGroup sync.WaitGroup for i, ip := range peersIp { + fmt.Println("閲嶅惎绗竴缁勬湇鍔�" + ip) if (i+1)%coreThread == 0 { masterIp = append(masterIp, strings.Split(ip, ":")[0]) for i := 0; i < len(masterIp); i++ { -- Gitblit v1.8.0