|
@@ -379,6 +379,7 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
@@ -379,6 +379,7 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
379
|
var url = contextPath + 'autoScalingTool/getIpsByScalingGroupId?groupName='+tmpGroupName+'&groupId='+souScalingGroupId+"&cloudType="+$("#cloudType").val();
|
379
|
var url = contextPath + 'autoScalingTool/getIpsByScalingGroupId?groupName='+tmpGroupName+'&groupId='+souScalingGroupId+"&cloudType="+$("#cloudType").val();
|
380
|
writeToText("开始..........");
|
380
|
writeToText("开始..........");
|
381
|
var count = 0;
|
381
|
var count = 0;
|
|
|
382
|
+ var errorTimes = 0;
|
382
|
var intervalIndex = setInterval(function() {
|
383
|
var intervalIndex = setInterval(function() {
|
383
|
$.ajax({
|
384
|
$.ajax({
|
384
|
url: url,
|
385
|
url: url,
|
|
@@ -387,9 +388,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
@@ -387,9 +388,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
387
|
timeout : 0,
|
388
|
timeout : 0,
|
388
|
success: function (data) {
|
389
|
success: function (data) {
|
389
|
if (!data || data.code != 200) {
|
390
|
if (!data || data.code != 200) {
|
390
|
- clearInterval(intervalIndex);
|
|
|
391
|
- writeToText("发生错误,refCloudMessage data 程序终止..........");
|
|
|
392
|
- responseError(data);
|
391
|
+ errorTimes++;
|
|
|
392
|
+ if(errorTimes>5){
|
|
|
393
|
+ clearInterval(intervalIndex);
|
|
|
394
|
+ writeToText("发生错误data is null or data code !=200,refCloudMessage data 程序终止..........");
|
|
|
395
|
+ writeToText("data is "+data);
|
|
|
396
|
+ responseError(data);
|
|
|
397
|
+ }else{
|
|
|
398
|
+ writeToText("发生错误data is null or data code !=200,继续获取数据,请耐心等待,getIpsByScalingGroupId data errorTimes =."+errorTimes);
|
|
|
399
|
+ writeToText("data is "+data);
|
|
|
400
|
+ }
|
393
|
}else{
|
401
|
}else{
|
394
|
//计算变化主机的ip
|
402
|
//计算变化主机的ip
|
395
|
var checkPassFlag=true;
|
403
|
var checkPassFlag=true;
|
|
@@ -436,9 +444,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
|
@@ -436,9 +444,16 @@ function refCloudMessage(cloudType,showMessage, serverChangeCount,desiredCapacit |
436
|
count += 1;
|
444
|
count += 1;
|
437
|
},
|
445
|
},
|
438
|
error: function (e) {
|
446
|
error: function (e) {
|
439
|
- clearInterval(intervalIndex);
|
|
|
440
|
- writeToText("发生错误,refCloudMessage 程序终止..........");
|
|
|
441
|
- requestError(url);
|
447
|
+ errorTimes++;
|
|
|
448
|
+ if(errorTimes>5){
|
|
|
449
|
+ clearInterval(intervalIndex);
|
|
|
450
|
+ writeToText("发生错误error,refCloudMessage 程序终止..........");
|
|
|
451
|
+ writeToText("error is "+e);
|
|
|
452
|
+ requestError(url);
|
|
|
453
|
+ }else{
|
|
|
454
|
+ writeToText("发生错误error,继续获取数据,请耐心等待,getIpsByScalingGroupId data errorTimes =."+errorTimes);
|
|
|
455
|
+ writeToText("error is "+e);
|
|
|
456
|
+ }
|
442
|
}
|
457
|
}
|
443
|
});
|
458
|
});
|
444
|
}, 20000);
|
459
|
}, 20000);
|