From: Ian Jackson Date: Fri, 24 Jul 2020 15:52:10 +0000 (+0100) Subject: sg-report-host-history: Rerganisation: Change loops X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=83ea4fa43a737275e2c45477ee88fe944f53bce1;p=osstest.git sg-report-host-history: Rerganisation: Change loops 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 --- diff --git a/sg-report-host-history b/sg-report-host-history index 3f4670e..2ca0e23 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -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; }); }