Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #466 from k82cn/k8s_454
Browse files Browse the repository at this point in the history
Ordered Job by creation time.
  • Loading branch information
k8s-ci-robot authored Nov 7, 2018
2 parents 6a334ee + 5126f0b commit 9591b90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/scheduler/framework/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ func (ssn *Session) JobOrderFn(l, r interface{}) bool {
lv := l.(*api.JobInfo)
rv := r.(*api.JobInfo)

return lv.UID < rv.UID
if lv.CreationTimestamp.Equal(&rv.CreationTimestamp) {
return lv.UID < rv.UID
}

return lv.CreationTimestamp.Before(&rv.CreationTimestamp)

}

func (ssn *Session) QueueOrderFn(l, r interface{}) bool {
Expand Down

0 comments on commit 9591b90

Please sign in to comment.