From 019fc8e726876ee358416c6ab7f50496a190a12b Mon Sep 17 00:00:00 2001 From: Michael Meier Date: Tue, 7 Jun 2016 11:23:49 +0200 Subject: [PATCH] better stats for touching files --- scripts/osmtilecleanup.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/osmtilecleanup.pl b/scripts/osmtilecleanup.pl index a63d89a..bc931a1 100755 --- a/scripts/osmtilecleanup.pl +++ b/scripts/osmtilecleanup.pl @@ -201,7 +201,7 @@ sub dohandleexpiredlist() { } } } - $filesdone = 0; $filesseen = 0; + my $filesdone = 0; my $filesseen = 0; my $filesalreadytouched = 0; foreach $z (sort(keys(%rerenderlist))) { foreach $x (sort(keys(%{$rerenderlist{$z}}))) { foreach $y (sort(keys(%{$rerenderlist{$z}{$x}}))) { @@ -221,6 +221,7 @@ sub dohandleexpiredlist() { if (($curtime - $setbackinterval) > $mtime) { # Do not touch again - it's already 20 years back. #print("Not touching '$p', it's over 20 years old so probably has already been set back.\n"); + $filesalreadytouched++; } else { $filesdone++; my $newmtime = $mtime - $setbackinterval; @@ -240,7 +241,7 @@ sub dohandleexpiredlist() { if ($action == 3) { print("Sent re-rendering-requests for $filesdone files that actually existed (of $filesseen candidates)\n"); } elsif ($action == 4) { - print("Touched $filesdone files (of $filesseen candidates)\n"); + print("Touched $filesdone files ($filesseen candidates, $filesalreadytouched already touched)\n"); } } -- 2.25.1