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

[Xen-devel] [OSSTEST PATCH 06/13] sg-report-host-history: Add $cachekey argument to jobquery


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 8 Nov 2019 18:49:54 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 08 Nov 2019 18:50:38 +0000
  • Ironport-sdr: ruZtTklUsHsQJ8XEXXu5sytWtU6aYXdiMy35nK/i/u1+k7GD+X3mqwBtvWvB/R7gLvbsPEJLwA oNSaU6jfby5+eWMz6lD75F/InIZPWaQUXK0ERDx9OcVOT/jb8AbkwoxDhjk+0WCsO8WFXTdht6 waOHFhLCq+fIH79y9unTEA+s5I/KxBbCaPXb9L97M8Z4e6TMA2/qz7hwc0f1ds0SRvRJZM2aSQ K4TL6Ou2FUp/AkiLDWBtB9yvAEfxX4MTOJ9o9kvVRci0Y26OFicDG3hIm29d1v6OMptisA02hY wAw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This key will distinguish the results of different queries we do per
job.  Right now it is not used, so no functional change.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 sg-report-host-history | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sg-report-host-history b/sg-report-host-history
index 81a7a8d8..4c40cbec 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -109,7 +109,8 @@ END
     print DEBUG "MINFLIGHT $minflight\n";
 }
 
-sub jobquery ($$) {
+sub jobquery ($$$) {
+    my ($q, $jr, $cachekey) = @_;
     my ($q, $jr) = @_;
     $q->execute($jr->{flight}, $jr->{job});
     return $q->fetchrow_hashref();
@@ -218,7 +219,7 @@ END
     foreach my $jr (@$inrows) {
        print DEBUG "JOB $jr->{flight}.$jr->{job} ";
 
-       my $endedrow = jobquery($endedq, $jr);
+       my $endedrow = jobquery($endedq, $jr, 'e');
        if (!$endedrow) {
            print DEBUG "no-finished\n";
            next;
@@ -235,8 +236,8 @@ END
     my $alternate = 0;
     foreach my $jr (@rows) {
         print DEBUG "JR $jr->{flight}.$jr->{job}\n";
-       my $ir = jobquery($infoq, $jr);
-       my $ar = jobquery($allocdq, $jr);
+       my $ir = jobquery($infoq, $jr, 'i');
+       my $ar = jobquery($allocdq, $jr, 'a');
        my $ident = $jr->{name};
        $jrunvarq->execute($jr->{flight}, $jr->{job}, $ident);
         my %runvars;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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