]> xenbits.xensource.com Git - osstest.git/commitdiff
sg-report-host-history: Rerganisation: Change loops
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 24 Jul 2020 15:52:10 +0000 (16:52 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 6 Aug 2020 09:23:19 +0000 (10:23 +0100)
Move the per-host code all into the same per-host loop.  One effect is
to transpose the db_retry and host loops for mainquery.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-report-host-history

index 3f4670e5f667a3ab112dd4388e47f65c4fc103a1..2ca0e235ee51723a1cb815da5064c966ad125cec 100755 (executable)
@@ -470,18 +470,10 @@ db_retry($dbh_tests, [], sub {
     computeflightsrange();
 });
 
-foreach (keys %hosts) {
-    read_existing_logs($_);
-}
-
-db_retry($dbh_tests, [], sub {
-    foreach my $host (sort keys %hosts) {
-       mainquery($host);
-    }
-});
-
 foreach my $host (sort keys %hosts) {
+    read_existing_logs($host);
     db_retry($dbh_tests, [], sub {
+        mainquery($host);
        reporthost $host;
     });
 }