updated deployinstancelistlogic
This commit is contained in:
parent
319fb4908f
commit
4b21b863c4
|
@ -59,23 +59,21 @@ func (l *DeployInstanceListLogic) DeployInstanceList(req *types.DeployInstanceLi
|
||||||
}
|
}
|
||||||
list := common.ConcatMultipleSlices(slices)
|
list := common.ConcatMultipleSlices(slices)
|
||||||
|
|
||||||
if len(list) == 0 {
|
if len(list) != 0 {
|
||||||
return
|
go updater.UpdateDeployInstanceStatusBatch(l.svcCtx, list)
|
||||||
}
|
|
||||||
|
|
||||||
go updater.UpdateDeployInstanceStatusBatch(l.svcCtx, list)
|
ins := list[0]
|
||||||
|
for i := range list {
|
||||||
ins := list[0]
|
uTime, _ := time.Parse(time.RFC3339, ins.UpdateTime)
|
||||||
for i := range list {
|
latest, _ := time.Parse(time.RFC3339, list[i].UpdateTime)
|
||||||
uTime, _ := time.Parse(time.RFC3339, ins.UpdateTime)
|
if latest.After(uTime) {
|
||||||
latest, _ := time.Parse(time.RFC3339, list[i].UpdateTime)
|
ins = list[i]
|
||||||
if latest.After(uTime) {
|
}
|
||||||
ins = list[i]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
go updater.UpdateDeployInstanceStatus(l.svcCtx, ins, true)
|
go updater.UpdateDeployInstanceStatus(l.svcCtx, ins, true)
|
||||||
go updater.UpdateDeployTaskStatus(l.svcCtx)
|
go updater.UpdateDeployTaskStatus(l.svcCtx)
|
||||||
|
}
|
||||||
|
|
||||||
resp.List = &deployTasks
|
resp.List = &deployTasks
|
||||||
resp.PageSize = req.PageSize
|
resp.PageSize = req.PageSize
|
||||||
|
|
Loading…
Reference in New Issue