提交 13ddb0f8 编写于 作者: D dangyifei

only not succ inst recieve response

上级 97f3eab8
......@@ -81,8 +81,8 @@ func CmdInstsDownload() {
}
}
for i, inst := range Dict.Instances {
if inst.Status != dict.Instance_Status_Download_Succ {
err := <-chs[i]
logex.Noticef("[instance resp]download:%v", Dict.Instances)
if err != nil || keyAndRespSlice[i].Success != "0" {
logex.Warningf("cmd cube online downlaod of %v:%v, shard:%v failed", inst.AgentIp, inst.AgentPort, inst.Shard)
continue
......@@ -93,6 +93,7 @@ func CmdInstsDownload() {
Dict.DownloadSuccInsts++
}
}
}
if Dict.DownloadSuccInsts == Dict.InstancesNum {
Dict.WaitVersionInfo.Status = dict.Dict_Status_Download_Succ
fmt.Printf("[all download ok]inst :%v\n", Dict.Instances)
......@@ -130,6 +131,7 @@ func CmdInstsReload() {
}
}
for i, inst := range Dict.Instances {
if inst.Status != dict.Instance_Status_Reload_Succ {
err := <-chs[i]
logex.Noticef("[instance resp]reload:%v", Dict.Instances)
if err != nil || keyAndRespSlice[i].Success != "0" {
......@@ -142,6 +144,7 @@ func CmdInstsReload() {
Dict.ReloadSuccInsts++
}
}
}
if Dict.ReloadSuccInsts == Dict.InstancesNum {
Dict.WaitVersionInfo.Status = dict.Dict_Status_Reload_Succ
fmt.Printf("[all reload ok]inst:%v\n", Dict.Instances)
......@@ -179,6 +182,7 @@ func CmdInstsEnable() {
}
}
for i, inst := range Dict.Instances {
if inst.Status != dict.Instance_Status_Enable_Succ {
err := <-chs[i]
logex.Noticef("[instance resp]enable:%v", Dict.Instances)
if err != nil || keyAndRespSlice[i].Success != "0" {
......@@ -191,6 +195,7 @@ func CmdInstsEnable() {
Dict.EnableSuccInsts++
}
}
}
if Dict.EnableSuccInsts == Dict.InstancesNum {
Dict.WaitVersionInfo.Status = dict.Dict_Status_Finished
fmt.Printf("[all enable ok]inst :%v\n", Dict.Instances)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册