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 {
|
for _, task := range taskList {
|
||||||
t := task
|
t := task
|
||||||
if t.Status == constants.Completed {
|
if t.Status == constants.Completed || task.Status == constants.Failed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
|
|
|
@ -80,8 +80,7 @@ func (l *PageListTaskLogic) PageListTask(req *types.PageTaskReq) (resp *types.Pa
|
||||||
for _, ch := range chs {
|
for _, ch := range chs {
|
||||||
select {
|
select {
|
||||||
case <-ch:
|
case <-ch:
|
||||||
return
|
case <-time.After(2 * time.Second):
|
||||||
case <-time.After(1 * time.Second):
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +92,7 @@ func (l *PageListTaskLogic) updateTaskStatus(tasks []*types.TaskModel, ch chan<-
|
||||||
if task.AdapterTypeDict != 1 {
|
if task.AdapterTypeDict != 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if task.Status == constants.Succeeded {
|
if task.Status == constants.Succeeded || task.Status == constants.Failed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +170,7 @@ func (l *PageListTaskLogic) updateAiTaskStatus(tasks []*types.TaskModel, ch chan
|
||||||
if task.AdapterTypeDict != 1 {
|
if task.AdapterTypeDict != 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if task.Status == constants.Succeeded {
|
if task.Status == constants.Succeeded || task.Status == constants.Failed {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue