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

[OSSTEST PATCH 15/60] history reporting (nfc): Introduce cache_set_key_cols


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:20 +0100
  • Authentication-results: esa1.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:22:30 +0000
  • Ironport-sdr: Dvfpk2V3imRT+F9GdlmwJ2Stpeyx6tur2Q73/P3xHH8H7B1bL8TI1Tto2stI0ng3nqHrR9DJ8L m6A3GVCRPkai7iWsrOQy9D+c1HP1VHAkdr6THDQGQnkRUuQAGzkZ2J/Idz2uFwskuU3vnFtNc/ fWWhKtzh3aJDHjubDDlhfgnixq8dEtKTojQ+O22qx0d3ZdL7Y4VQ+pd++qobBDi4Jo5AWpnD8Z Js3w49RxS5P6s2NLxyQKpXeTX3UDubPy+fLjf1bMLxA3D876qraQBl4HRb3GbHAH4pqDrdzdXu zlY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This setter function will be needed when this becomes its own module.

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

diff --git a/sg-report-host-history b/sg-report-host-history
index 9510757f..07e549a0 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -76,12 +76,14 @@ our $restrictflight_cond = restrictflight_cond();
 our $flightcond;
 our $minflight;
 
+our @cache_row_key_cols;
+
 our %cache;
 
 our %q_count;
 our %q_misses;
 
-our @cache_row_key_cols = qw(flight job status name);
+sub cache_set_key_cols { @cache_row_key_cols = @_; }
 
 sub cache_row_key ($) {
     my ($jr) = @_;
@@ -177,6 +179,8 @@ sub cache_write_entry ($$) {
     print $fh " -->\n";
 }
 
+cache_set_key_cols(qw(flight job status name));
+
 sub computeflightsrange () {
     if ($flightlimit) {
        my $minflightsq = db_prepare(<<END);
-- 
2.11.0




 


Rackspace

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