Disabled VMs should probably not have deadlines but it makes sense to ignore them anyway.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Engine/Scheduler.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm index 85bc0f397..159b10cf8 100644 --- a/testbot/lib/WineTestBot/Engine/Scheduler.pm +++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm @@ -1010,7 +1010,9 @@ sub ScheduleJobs()
# Reschedule at the latest when the next task times out my $FirstDeadline; - foreach my $VM (@{$Sched->{VMs}->GetItems()}) + my $VMs = $Sched->{VMs}->Clone(); + $VMs->FilterEnabledRole(); + foreach my $VM (@{$VMs->GetItems()}) { if (defined $VM->ChildDeadline and (!defined $FirstDeadline or $VM->ChildDeadline < $FirstDeadline))