手动健康检查增加超时时间为60s

This commit is contained in:
GoEdgeLab
2022-04-22 20:56:49 +08:00
parent 6366e98ce2
commit a566c52821
3 changed files with 9 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ Tea.context(function () {
this.results = []
this.countSuccess = 0
this.countFail = 0
this.errorString = ""
this.$delay(function () {
this.run()
@@ -12,11 +13,13 @@ Tea.context(function () {
this.run = function () {
this.isRequesting = true
this.errorString = ""
this.$post("$")
.params({
clusterId: this.clusterId
})
.timeout(60)
.success(function (resp) {
this.results = resp.data.results
let that = this
@@ -32,6 +35,9 @@ Tea.context(function () {
}
})
})
.error(function () {
this.errorString = "执行健康检查超时,请重试"
})
.done(function () {
this.isRequesting = false
})