[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 31/60] sg-report-job-history: Prep for fork: Move $buildsq query


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:36 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Aug 2020 17:27:09 +0000
  • Ironport-sdr: 9BULI4WaFnmOP0IWATDe50lEkRiAS7v+k23D/fvybUNsECBZfnrUx7zmA/yS9oUAUzi3cngFFh KLi9kzPWUexJx9iAIdYN7KSa28buvQUut7rC6cYqI06sMB8Aas5tKTrTJnXGXPvcUV9A0TgP2W Fx4k/thKN3yAZH44l5lCwQmHyFKVr4GoRj/6ekHxYvoa5BMnjvaAIOrPMLk1mpyHjRvfjNFhE8 oukIIb3S+yIzoS9d2iT0NywaUd7ls4UkXBujJMv2CNAMJZSDLd2oClxdrBr8Fpl/il5tYZUHhm ehY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.