Merge pull request 'fix aitasklist bugs' (#177) from tzwang/pcm-coordinator:master into master
Former-commit-id: e174a7654e0328eeb354e4da3e797abdc20eb6fe
This commit is contained in:
commit
7101925e9c
|
@ -101,7 +101,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 || task.Status == constants.Failed {
|
||||
continue
|
||||
}
|
||||
wg.Add(1)
|
||||
|
|
|
@ -80,8 +80,7 @@ func (l *PageListTaskLogic) PageListTask(req *types.PageTaskReq) (resp *types.Pa
|
|||
for _, ch := range chs {
|
||||
select {
|
||||
case <-ch:
|
||||
return
|
||||
case <-time.After(1 * time.Second):
|
||||
case <-time.After(2 * time.Second):
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +92,7 @@ func (l *PageListTaskLogic) updateTaskStatus(tasks []*types.TaskModel, ch chan<-
|
|||
if task.AdapterTypeDict != 1 {
|
||||
continue
|
||||
}
|
||||
if task.Status == constants.Succeeded {
|
||||
if task.Status == constants.Succeeded || task.Status == constants.Failed {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -171,7 +170,7 @@ func (l *PageListTaskLogic) updateAiTaskStatus(tasks []*types.TaskModel, ch chan
|
|||
if task.AdapterTypeDict != 1 {
|
||||
continue
|
||||
}
|
||||
if task.Status == constants.Succeeded {
|
||||
if task.Status == constants.Succeeded || task.Status == constants.Failed {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue