sunty
2020-04-16 978ac794a5f87bada64ca078382eb1a392da8ce3
controllers/swfsControllers.go
@@ -122,8 +122,10 @@
      fmt.Println("ip: ", ip)
      url := "http://" + ip + ":7020/node/api-v/swfs/updateSWFSService"
      fmt.Println("url", url)
      http.Get(url)
      fmt.Println("请求完毕")
      resp, _ := http.Get(url)
      if resp.StatusCode == 200 {
         fmt.Println("请求完毕", resp.StatusCode)
      }
   }
}
@@ -155,7 +157,9 @@
      startupItem = string(body)
   }
   tick := time.Tick(1 * time.Second)
   fmt.Println("准备开始验证节点服务")
   for countdown := timeOut; countdown > 0; countdown-- {
      fmt.Println("第一次验证")
      result := Verification(startupItem, ip)
      if result == true {
         break
@@ -210,6 +214,7 @@
      fmt.Println("重启第一组服务" + ip)
      if (i+1)%coreThread == 0 {
         masterIp = append(masterIp, strings.Split(ip, ":")[0])
         fmt.Println("加入第一组并开始验证第一组 masterIp: ", masterIp)
         for i := 0; i < len(masterIp); i++ {
            go Restart(masterIp[i], timeOut)
            waitGroup.Add(1) //每创建一个goroutine,就把任务队列中任务的数量+1
@@ -229,7 +234,6 @@
            break
         }
      }
      continue
   }
}