use HTML::Entities;
use Osstest::Executive;
+use Osstest::HistoryReport;
our (@blessings,@branches);
our $limit= 100;
our $htmlout;
our $flight;
+our $maxjobs=10;
our $job;
open DEBUG, ">/dev/null";
while (@ARGV && $ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
last if m/^--?$/;
- if (m/^--(job|flight)\=(.*)$/) {
+ if (m/^--(job|flight|maxjobs)\=(.*)$/) {
$$1= $2;
} elsif (m/^--(limit)\=([1-9]\d*)$/) {
$$1= $2;
processjobbranch($j,$_) foreach @branches;
}
-db_begin_work($dbh_tests, []);
-db_readonly_report();
-foreach my $j (@jobs) { processjob($j); }
+parallel_by_fork('sg-report-job-history', $maxjobs, \@jobs, sub {
+ my ($j) = @_;
+ db_retry($dbh_tests, [], sub {
+ processjob($j);
+ });
+});