sunty
2020-04-16 e74b50544622728a75f29d93cef4ea9c9d26f688
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++ {