| @@ -71,6 +71,11 @@ func UpdateTaskStatus(svc *svc.ServiceContext, tasklist []*types.TaskModel) { | |||||
| task.Status = constants.Succeeded | task.Status = constants.Succeeded | ||||
| logx.Errorf("############ Report Status Message Before Sending %s", task.Status) | logx.Errorf("############ Report Status Message Before Sending %s", task.Status) | ||||
| _ = reportStatusMessages(svc, task, aiTask[0]) | |||||
| case constants.Running: | |||||
| task.Status = constants.Succeeded | |||||
| logx.Errorf("############ Report Status Message Before Sending %s", task.Status) | |||||
| _ = reportStatusMessages(svc, task, aiTask[0]) | _ = reportStatusMessages(svc, task, aiTask[0]) | ||||
| case constants.Failed: | case constants.Failed: | ||||
| task.Status = constants.Failed | task.Status = constants.Failed | ||||
| @@ -189,6 +194,8 @@ func reportStatusMessages(svc *svc.ServiceContext, task *types.TaskModel, aiTask | |||||
| } | } | ||||
| func updateInferTaskStatus(svc *svc.ServiceContext, task types.TaskModel) { | func updateInferTaskStatus(svc *svc.ServiceContext, task types.TaskModel) { | ||||
| svc.Scheduler.AiService.TaskSyncLock.Lock() | |||||
| defer svc.Scheduler.AiService.TaskSyncLock.Unlock() | |||||
| aiTask, err := svc.Scheduler.AiStorages.GetAiTaskListById(task.Id) | aiTask, err := svc.Scheduler.AiStorages.GetAiTaskListById(task.Id) | ||||
| if err != nil { | if err != nil { | ||||
| logx.Errorf(err.Error()) | logx.Errorf(err.Error()) | ||||