fix bug
Signed-off-by: jagger <cossjie@foxmail.com> Former-commit-id: 20538e4d45cbb65ba09b606a1d1805089b9560a9
This commit is contained in:
parent
375de5c4b2
commit
f0d461cbef
|
@ -86,7 +86,7 @@ func (l *PageListTaskLogic) PageListTask(req *types.PageTaskReq) (resp *types.Pa
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch chan<- struct{}) {
|
func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch chan<- struct{}) {
|
||||||
var list []*types.TaskModel
|
list := make([]*types.TaskModel, len(tasklist))
|
||||||
copy(list, tasklist)
|
copy(list, tasklist)
|
||||||
for i := len(list) - 1; i >= 0; i-- {
|
for i := len(list) - 1; i >= 0; i-- {
|
||||||
if list[i].AdapterTypeDict != 1 || list[i].Status == constants.Succeeded || list[i].Status == constants.Failed {
|
if list[i].AdapterTypeDict != 1 || list[i].Status == constants.Succeeded || list[i].Status == constants.Failed {
|
||||||
|
@ -209,7 +209,7 @@ func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch cha
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *PageListTaskLogic) updateAiTaskStatus(tasklist []*types.TaskModel, ch chan<- struct{}) {
|
func (l *PageListTaskLogic) updateAiTaskStatus(tasklist []*types.TaskModel, ch chan<- struct{}) {
|
||||||
var list []*types.TaskModel
|
list := make([]*types.TaskModel, len(tasklist))
|
||||||
copy(list, tasklist)
|
copy(list, tasklist)
|
||||||
for i := len(list) - 1; i >= 0; i-- {
|
for i := len(list) - 1; i >= 0; i-- {
|
||||||
if list[i].AdapterTypeDict != 1 || list[i].Status == constants.Succeeded || list[i].Status == constants.Failed {
|
if list[i].AdapterTypeDict != 1 || list[i].Status == constants.Succeeded || list[i].Status == constants.Failed {
|
||||||
|
|
Loading…
Reference in New Issue