SELECT branch FROM flights WHERE flight=?
END
die "$flight ? @$branches ?" if @$branches!=1;
- @branches= @$branches;
+ @branches= ('ALL', @$branches);
my $selectq= db_prepare(<<END);
SELECT job FROM jobs WHERE flight=? ORDER BY JOB
}
sub processjobbranch ($$$) {
- my ($j,$bra,$html_file) = @_;
+ my ($j,$branch_or_all,$html_file) = @_;
+
+ my $bra = $branch_or_all;
+ undef $bra if $bra eq 'ALL';
my $buildsq= db_prepare(<<END);
SELECT * FROM runvars
my @tasks;
foreach my $j (@jobs) {
- push @tasks, $j;
push @tasks, "$j $_" foreach @branches;
}
parallel_by_fork('sg-report-job-history', $maxjobs, \@tasks, sub {
my ($task) = @_;
my ($job, $branch) = split / /, $task; # $branch might be undef
- my $html_file = sprintf "history/%s/%s.html", $job, ($branch // 'ALL');
+ my $html_file = sprintf "history/%s/%s.html", $job, $branch;
db_retry($dbh_tests, [], sub {
processjobbranch($job, $branch, $html_file);
});