sunty
2020-04-16 b6ad0b3284a825e4239760153f2ce4d19197057a
uasa unit test
1个文件已修改
4 ■■■■ 已修改文件
controllers/swfsControllers.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/swfsControllers.go
@@ -161,6 +161,7 @@
    for countdown := timeOut; countdown > 0; countdown-- {
        fmt.Println("第一次验证")
        result := Verification(startupItem, ip)
        fmt.Println("第一次验证result结果:", result)
        if result == true {
            break
        }
@@ -210,12 +211,15 @@
    masterIp := make([]string, 0)
    timeOut, _ := strconv.Atoi(config.Server.TimeOut)
    var waitGroup sync.WaitGroup
    fmt.Println("当前并行度coreThread:", coreThread)
    for i, ip := range peersIp {
        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++ {
                fmt.Println("len masterIp: ", len(masterIp))
                fmt.Println("第" + strconv.Itoa(i) + "个线程")
                go Restart(masterIp[i], timeOut)
                waitGroup.Add(1) //每创建一个goroutine,就把任务队列中任务的数量+1
            }