1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

Make returned proc list to be returned always in correct order (#1060)

This commit is contained in:
Lauris BH 2022-08-02 19:34:16 +03:00 committed by GitHub
parent 75b62ffadc
commit 550aefead4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,10 @@ func (s storage) ProcChild(build *model.Build, ppid int, child string) (*model.P
func (s storage) ProcList(build *model.Build) ([]*model.Proc, error) {
procList := make([]*model.Proc, 0, perPage)
return procList, s.engine.Where("proc_build_id = ?", build.ID).Find(&procList)
return procList, s.engine.
Where("proc_build_id = ?", build.ID).
OrderBy("proc_pid").
Find(&procList)
}
func (s storage) ProcCreate(procs []*model.Proc) error {