[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 32/60] sg-report-job-history: Prep for fork: Move $revisionsq query
We will need to prepare this in add_revisions so that it works when we do each (job,branch) in a different process. It is OK that it is still global, becauswe we only call add_revisions in the children. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- sg-report-job-history | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sg-report-job-history b/sg-report-job-history index 47fc7a62..424053f1 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -89,15 +89,16 @@ if (defined($flight)) { push @jobs, $job; } -our $revisionsq= db_prepare(<<END); +sub add_revisions ($$$$) { + my ($revmap, $flightnum, $j, $sfx) = @_; + + our $revisionsq //= db_prepare(<<END); SELECT * FROM runvars WHERE flight=? AND job=? AND name LIKE 'built\\_revision\\_%' END -# (We report on non-main-revision jobs just as for main-revision ones.) + # (We report on non-main-revision jobs just as for main-revision ones.) -sub add_revisions ($$$$) { - my ($revmap, $flightnum, $j, $sfx) = @_; $revisionsq->execute($flightnum, $j); while (my $row= $revisionsq->fetchrow_hashref()) { my $n= $row->{name}; -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |