Skip to content

Commit

Permalink
Make returned proc list to be returned always in correct order (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks authored Aug 2, 2022
1 parent 75b62ff commit 550aefe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/store/datastore/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 550aefe

Please sign in to comment.