|
|
@ -35,7 +35,9 @@ class HeroUnion { |
|
|
|
this.task_data_max_size = 1024; //任务数据最大字节数,单位:KB
|
|
|
|
this.task_data_max_size = 1024; //任务数据最大字节数,单位:KB
|
|
|
|
this.notify_timeout = 8; //回调通知请求超时时长,单位:秒
|
|
|
|
this.notify_timeout = 8; //回调通知请求超时时长,单位:秒
|
|
|
|
|
|
|
|
|
|
|
|
this.stats = {}; |
|
|
|
this.stats = { |
|
|
|
|
|
|
|
start_time: common.getTimestampInSeconds() |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
this.heros = []; //hero爬虫队列
|
|
|
|
this.heros = []; //hero爬虫队列
|
|
|
|
this.tasks = []; //任务队列
|
|
|
|
this.tasks = []; //任务队列
|
|
|
@ -329,6 +331,10 @@ class HeroUnion { |
|
|
|
|
|
|
|
|
|
|
|
//获取联盟状态
|
|
|
|
//获取联盟状态
|
|
|
|
stats() { |
|
|
|
stats() { |
|
|
|
|
|
|
|
this.stats.taskStatus = this.taskStatus; |
|
|
|
|
|
|
|
this.stats.heroStatus = this.heroStatus; |
|
|
|
|
|
|
|
this.stats.run_seconds = common.getTimestampInSeconds() - this.stats.start_time; |
|
|
|
|
|
|
|
|
|
|
|
return this.stats; |
|
|
|
return this.stats; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|