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 {