Do not report retrying when task has been failed

This commit is contained in:
Firmlyzhu 2019-04-12 18:03:01 +08:00
parent 876fb83326
commit 84f4c18e2d
1 changed files with 5 additions and 3 deletions

View File

@ -417,6 +417,7 @@ class TaskMgr(threading.Thread):
[success, msg] = self.start_vnode(sub_task) [success, msg] = self.start_vnode(sub_task)
if not success: if not success:
sub_task.waiting_for_retry("Fail to start vnode.") sub_task.waiting_for_retry("Fail to start vnode.")
if sub_task.status == WAITING:
self.jobmgr.report(task.username, task.id, 'retrying', "Fail to start vnode.") self.jobmgr.report(task.username, task.id, 'retrying', "Fail to start vnode.")
sub_task.worker = None sub_task.worker = None
start_all_vnode_success = False start_all_vnode_success = False
@ -436,7 +437,8 @@ class TaskMgr(threading.Thread):
if success: if success:
sub_task.status = RUNNING sub_task.status = RUNNING
else: else:
sub_task.waiting_for_retry("Failt to start task.") sub_task.waiting_for_retry("Fail to start task.")
if sub_task.status == WAITING:
self.jobmgr.report(task.username, task.id, 'retrying', "Fail to start task.") self.jobmgr.report(task.username, task.id, 'retrying', "Fail to start task.")
def clear_sub_tasks(self, sub_task_list): def clear_sub_tasks(self, sub_task_list):