There is no need to reschedule after handling each patch in the staging directory. The scheduler will handle them all at once.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/Engine.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index b61db8871..64359ae06 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -431,7 +431,7 @@ sub HandleWinePatchMLSubmission() my @Entries = readdir($dh); closedir($dh);
- my @ErrMessages; + my ($NewPatch, @ErrMessages); foreach my $Entry (@Entries) { # Validate file name @@ -446,9 +446,14 @@ sub HandleWinePatchMLSubmission() $Parser->output_dir($WorkDir); my $Entity = $Parser->parse_open($FullMessageFileName); my $ErrMessage = CreatePatches()->NewPatch($Entity); - push @ErrMessages, $ErrMessage if (defined $ErrMessage); - - ScheduleJobs(); + if (defined $ErrMessage) + { + push @ErrMessages, $ErrMessage; + } + else + { + $NewPatch = 1; + }
# Clean up if (!rmtree($WorkDir)) @@ -463,6 +468,7 @@ sub HandleWinePatchMLSubmission() LogMsg "Unable to delete '$FullMessageFileName': $!\n"; } } + ScheduleJobs() if ($NewPatch);
return @ErrMessages ? "0". join("; ", @ErrMessages) : "1OK"; }