Browse Source

update syncreportmessage error msg

pull/450/head
tzwang 8 months ago
parent
commit
cba74a19be
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      internal/scheduler/service/utils/status/taskStatusSync.go

+ 7
- 0
internal/scheduler/service/utils/status/taskStatusSync.go View File

@@ -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())


Loading…
Cancel
Save