Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Engine/Scheduler.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm index f606c0d07..cc2ea1f18 100644 --- a/testbot/lib/WineTestBot/Engine/Scheduler.pm +++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm @@ -44,8 +44,9 @@ use WineTestBot::VMs; sub CompareJobPriority { # Process Jobs with a higher Priority value last (it's a niceness in fact), - # and older Jobs first. - return $a->Priority <=> $b->Priority || $a->Id <=> $b->Id; + # and older Jobs first. And use GetColValue() for performance. + return $a->GetColValue("Priority") <=> $b->GetColValue("Priority") || + $a->GetColValue("Id") <=> $b->GetColValue("Id"); }
=pod