]> xenbits.xensource.com Git - osstest.git/commitdiff
sg-report-job-history: Prep for fork: Move $buildsq query
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 10 Aug 2020 11:50:59 +0000 (12:50 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 19 Aug 2020 10:41:18 +0000 (11:41 +0100)
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.jackson@eu.citrix.com>
sg-report-job-history

index 6008ca722c205474bc593ef7b927a105ba23ec06..47fc7a62c32f5bd81ada001451bee509a07b45d3 100755 (executable)
@@ -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;