|
|
|
@ -95,6 +95,18 @@ class TaskMoniter {
@@ -95,6 +95,18 @@ class TaskMoniter {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setTaskWaiting(task_id) { |
|
|
|
|
if (typeof(this.tasks[task_id]) == 'undefined') { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.taskStatus[this.tasks[task_id].status] --; |
|
|
|
|
this.taskStatus[this.statusCode.waiting] ++; |
|
|
|
|
this.tasks[task_id].status = this.statusCode.waiting; |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setTaskDone(task_id) { |
|
|
|
|
if (typeof(this.tasks[task_id]) == 'undefined') { |
|
|
|
|
return false; |
|
|
|
@ -243,8 +255,8 @@ class TaskMoniter {
@@ -243,8 +255,8 @@ class TaskMoniter {
|
|
|
|
|
console.log("[%s][%s] Task %s's data save to HeroUnion done", |
|
|
|
|
common.getTimeString(), task.notify_time, task.id); |
|
|
|
|
}else { |
|
|
|
|
console.log("[%s][%s] Task %s's data save to HeroUnion failed, it will try again later.", |
|
|
|
|
common.getTimeString(), task.notify_time, task.id); |
|
|
|
|
console.error("[%s][%s] Task %s's data save to HeroUnion failed, it will try again later. Error message: %s", |
|
|
|
|
common.getTimeString(), task.notify_time, task.id, saveRes.message); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.updateTask(task.id, task); //更新任务数据
|
|
|
|
|