Merge pull request 'fix submit bugs' (#167) from tzwang/pcm-coordinator:master into master

Former-commit-id: f37ad9723be7ccbd56a18f3996ab888862275db1
This commit is contained in:
tzwang 2024-05-11 19:37:12 +08:00
commit e7eaa2be38
3 changed files with 6 additions and 2 deletions

View File

@ -92,7 +92,7 @@ func (l *GetCenterTaskListLogic) updateAiTaskStatus(mu *sync.RWMutex, ch chan<-
}
for _, task := range taskList {
t := task
if t.Status == constants.Completed {
if t.Status == constants.Completed || t.JobId == "" {
continue
}
wg.Add(1)

View File

@ -197,7 +197,7 @@ func (as *AiScheduler) AssignTask(clusters []*strategy.AssignedCluster) (interfa
return nil, errors.New("database add failed: " + err.Error())
}
}
for s := range ch {
for _, s := range results {
if s.Msg != "" {
msg := fmt.Sprintf("clusterId: %v , error: %v \n", s.ClusterId, s.Msg)
errmsg += msg

View File

@ -471,6 +471,10 @@ func (o *OctopusLink) GetTrainingTaskLog(ctx context.Context, taskId string, ins
return "", err
}
if strings.Contains(resp.Content, "404 Not Found") {
resp.Content = "waiting for logs..."
}
return resp.Content, nil
}