Francois Gouget : testbot/Janitor: Load only the relevant tasks when deleting VMs.
Alexandre Julliard
julliard at winehq.org
Wed Jun 8 15:39:29 CDT 2022
Module: tools
Branch: master
Commit: 71cfc030d05b41983e4ad8b9b4c869566c044e1d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=71cfc030d05b41983e4ad8b9b4c869566c044e1d
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Wed Jun 8 16:40:46 2022 +0200
testbot/Janitor: Load only the relevant tasks when deleting VMs.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/bin/Janitor.pl | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index af1123a..618c31d 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -201,14 +201,14 @@ map { $DeletedVMs{$_} = 1 } @{$VMs->GetKeys()};
if (%DeletedVMs)
{
- foreach my $Task (@{CreateTasks($VMs)->GetItems()})
+ my $Tasks = CreateTasks($VMs);
+ $Tasks->AddFilter("VMName", [keys %DeletedVMs]);
+ foreach my $Task (@{$Tasks->GetItems()})
{
- if (exists $DeletedVMs{$Task->VM->Name})
- {
- Trace "Keeping the ", $Task->VM->Name, " VM for task ", $Task->GetSlashKey(), "\n";
- delete $DeletedVMs{$Task->VM->Name};
- last if (!%DeletedVMs);
- }
+ next if (!exists $DeletedVMs{$Task->VMName});
+ Trace "Keeping the ", $Task->VMName, " VM for task ", $Task->GetSlashKey(), "\n";
+ delete $DeletedVMs{$Task->VMName};
+ last if (!%DeletedVMs);
}
foreach my $VMKey (keys %DeletedVMs)
{
More information about the wine-cvs
mailing list