...
|
...
|
@@ -379,6 +379,7 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
|
var url = contextPath + 'autoScalingTool/getIpsByScalingGroupId?groupName='+tmpGroupName+'&groupId='+souScalingGroupId+"&cloudType="+$("#cloudType").val();
|
|
|
writeToText("开始..........");
|
|
|
var count = 0;
|
|
|
var errorTimes = 0;
|
|
|
var intervalIndex = setInterval(function() {
|
|
|
$.ajax({
|
|
|
url: url,
|
...
|
...
|
@@ -387,10 +388,17 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
|
timeout : 0,
|
|
|
success: function (data) {
|
|
|
if (!data || data.code != 200) {
|
|
|
errorTimes++;
|
|
|
if(errorTimes>5){
|
|
|
clearInterval(intervalIndex);
|
|
|
writeToText("发生错误,refCloudMessage data 程序终止..........");
|
|
|
writeToText("发生错误data is null or data code !=200,refCloudMessage data 程序终止..........");
|
|
|
writeToText("data is "+data);
|
|
|
responseError(data);
|
|
|
}else{
|
|
|
writeToText("发生错误data is null or data code !=200,继续获取数据,请耐心等待,getIpsByScalingGroupId data errorTimes =."+errorTimes);
|
|
|
writeToText("data is "+data);
|
|
|
}
|
|
|
}else{
|
|
|
//计算变化主机的ip
|
|
|
var checkPassFlag=true;
|
|
|
var changedIps="";
|
...
|
...
|
@@ -436,9 +444,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
|
count += 1;
|
|
|
},
|
|
|
error: function (e) {
|
|
|
errorTimes++;
|
|
|
if(errorTimes>5){
|
|
|
clearInterval(intervalIndex);
|
|
|
writeToText("发生错误,refCloudMessage 程序终止..........");
|
|
|
writeToText("发生错误error,refCloudMessage 程序终止..........");
|
|
|
writeToText("error is "+e);
|
|
|
requestError(url);
|
|
|
}else{
|
|
|
writeToText("发生错误error,继续获取数据,请耐心等待,getIpsByScalingGroupId data errorTimes =."+errorTimes);
|
|
|
writeToText("error is "+e);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}, 20000);
|
...
|
...
|
|