fix a bug that failed reason has not been cleared after fininshing the task

This commit is contained in:
Firmlyzhu 2019-04-12 16:15:06 +08:00
parent 729f1cec2f
commit c97e6a3a67
1 changed files with 1 additions and 0 deletions

View File

@ -171,6 +171,7 @@ class BatchJob(object):
self.tasks[task_idx]['db'].running_time = running_time self.tasks[task_idx]['db'].running_time = running_time
self.tasks[task_idx]['db'].end_time = datetime.now() self.tasks[task_idx]['db'].end_time = datetime.now()
self.tasks[task_idx]['db'].billing = billing self.tasks[task_idx]['db'].billing = billing
self.tasks[task_idx]['db'].failed_reason = ""
self.job_db = Batchjob.query.get(self.job_id) self.job_db = Batchjob.query.get(self.job_id)
self.job_db.billing += billing self.job_db.billing += billing
self.tasks_cnt['finished'] += 1 self.tasks_cnt['finished'] += 1