fix tasklist bugs
Former-commit-id: a37be139ca44f8eb0fb8a6a32420f14b324615fc
This commit is contained in:
parent
bf2019bf3f
commit
ba26039043
|
@ -117,6 +117,11 @@ func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch cha
|
|||
}
|
||||
|
||||
if len(aiTask) == 0 {
|
||||
tx = l.svcCtx.DbEngin.Model(task).Table("task").Where("deleted_at is null").Updates(task)
|
||||
if tx.Error != nil {
|
||||
logx.Errorf(tx.Error.Error())
|
||||
return
|
||||
}
|
||||
ch <- struct{}{}
|
||||
return
|
||||
}
|
||||
|
@ -146,6 +151,13 @@ func (l *PageListTaskLogic) updateTaskStatus(tasklist []*types.TaskModel, ch cha
|
|||
}
|
||||
|
||||
if len(aiTask) == 0 {
|
||||
task.UpdatedTime = time.Now().Format(constants.Layout)
|
||||
tx = l.svcCtx.DbEngin.Table("task").Model(task).Updates(task)
|
||||
if tx.Error != nil {
|
||||
logx.Errorf(tx.Error.Error())
|
||||
ch <- struct{}{}
|
||||
return
|
||||
}
|
||||
ch <- struct{}{}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue