|
|
|
@ -56,6 +56,13 @@ class HeroUnion {
@@ -56,6 +56,13 @@ class HeroUnion {
|
|
|
|
|
'failed': 0 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//任务通知回调相关数据
|
|
|
|
|
this.taskNotifyStatus = { |
|
|
|
|
'total': 0, |
|
|
|
|
'done': 0, |
|
|
|
|
'failed': 0 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
this.statusCode = { |
|
|
|
|
'waiting': '待处理', |
|
|
|
|
'running': '处理中', |
|
|
|
@ -347,6 +354,16 @@ class HeroUnion {
@@ -347,6 +354,16 @@ class HeroUnion {
|
|
|
|
|
this.tasks[taskIndex].notify_time ++; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//更新任务通知状态数据
|
|
|
|
|
if (notified) { |
|
|
|
|
this.taskNotifyStatus.total ++; |
|
|
|
|
this.taskNotifyStatus.done ++; |
|
|
|
|
}else if (!notified && this.tasks[taskIndex].notify_time == this.notify_max_try) { |
|
|
|
|
this.taskNotifyStatus.total ++; |
|
|
|
|
this.taskNotifyStatus.failed ++; |
|
|
|
|
common.error('[FAILED] Finally failed after %s try, notify to %s', this.notify_max_try, notify_url); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return notified; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -494,6 +511,7 @@ class HeroUnion {
@@ -494,6 +511,7 @@ class HeroUnion {
|
|
|
|
|
//获取联盟状态
|
|
|
|
|
getStats() { |
|
|
|
|
this.stats.taskStatus = this.taskStatus; |
|
|
|
|
this.stats.taskNotifyStatus = this.taskNotifyStatus; |
|
|
|
|
this.stats.heroStatus = this.heroStatus; |
|
|
|
|
this.stats.run_seconds = common.getTimestampInSeconds() - this.stats.start_time; |
|
|
|
|
|
|
|
|
|