|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 09/13] sg-report-host-history: Write cache entries for tail, too
mainquery fetches a number of rows supposed to be larger than needed
for the output limit $limit. And then for each host we sort them by
time of the last step - which means we must have the last step, which
is a separate query for each job. We want to cache this information
even for jobs we do not actually report in the html output.
(There is still nothing which actually reads this cache data.)
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
sg-report-host-history | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sg-report-host-history b/sg-report-host-history
index 335efa1c..7dcfac9a 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -268,10 +268,15 @@ END
};
@rows = sort { $b->{finished} <=> $a->{finished} } @rows;
- $#rows = $limit-1 if @rows > $limit;
my $alternate = 0;
+ my $wrote = 0;
foreach my $jr (@rows) {
+ if ($wrote++ >= $limit) {
+ $write_cache_entry->($jr);
+ next;
+ }
+
print DEBUG "JR $jr->{flight}.$jr->{job}\n";
my $ir = jobquery($infoq, $jr, 'i');
my $ar = jobquery($allocdq, $jr, 'a');
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |