...
|
...
|
@@ -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,9 +388,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
|
timeout : 0,
|
|
|
success: function (data) {
|
|
|
if (!data || data.code != 200) {
|
|
|
clearInterval(intervalIndex);
|
|
|
writeToText("发生错误,refCloudMessage data 程序终止..........");
|
|
|
responseError(data);
|
|
|
errorTimes++;
|
|
|
if(errorTimes>5){
|
|
|
clearInterval(intervalIndex);
|
|
|
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;
|
...
|
...
|
@@ -436,9 +444,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
|
count += 1;
|
|
|
},
|
|
|
error: function (e) {
|
|
|
clearInterval(intervalIndex);
|
|
|
writeToText("发生错误,refCloudMessage 程序终止..........");
|
|
|
requestError(url);
|
|
|
errorTimes++;
|
|
|
if(errorTimes>5){
|
|
|
clearInterval(intervalIndex);
|
|
|
writeToText("发生错误error,refCloudMessage 程序终止..........");
|
|
|
writeToText("error is "+e);
|
|
|
requestError(url);
|
|
|
}else{
|
|
|
writeToText("发生错误error,继续获取数据,请耐心等待,getIpsByScalingGroupId data errorTimes =."+errorTimes);
|
|
|
writeToText("error is "+e);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}, 20000);
|
...
|
...
|
|