We will need to prepare this once per (job,branch) so that it works
when we do each of those in a different process.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 sg-report-job-history | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sg-report-job-history b/sg-report-job-history
index 6008ca72..47fc7a62 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -106,15 +106,15 @@ sub add_revisions ($$$$) {
     }
 }
 
-our $buildsq= db_prepare(<<END);
+sub processjobbranch ($$) {
+    my ($j,$bra) = @_;
+
+    my $buildsq= db_prepare(<<END);
         SELECT * FROM runvars
          WHERE flight=? AND job=?
            AND name LIKE '%buildjob'
 END
 
-sub processjobbranch ($$) {
-    my ($j,$bra) = @_;
-
     print DEBUG "processjobbranch('$j',", ($bra ? "'$bra'" : 'undef'), ")\n";
 
     my %rev_grid_col;
-- 
2.11.0


Reply via email to