1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-12 23:36:44 +00:00
This commit is contained in:
2019-08-01 15:03:56 +08:00
parent 1ff5279823
commit d892da43f7
2 changed files with 12 additions and 10 deletions

View File

@@ -33,10 +33,7 @@ func (s FairJobSorter) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
func (s FairJobSorter) Less(i, j int) bool {
if s[i].Priority > s[j].Priority {
return true
}
return s[i].CreatedAt > s[j].CreatedAt
return s[i].CreatedAt < s[j].CreatedAt
}
func (scheduler *SchedulerFair) Start() {
@@ -362,7 +359,5 @@ func (scheduler *SchedulerFair) UpdateNextQueue() {
}
}
scheduler.nextQueue = next
log.Info("updateNextQueue")
log.Info(scheduler.resourceAllocations)
log.Info("updateNextQueue ->", next)
}