# HG changeset patch # User Matti Hamalainen # Date 1483650931 -7200 # Node ID 33b5e7adc30c46e38fbf2b279d2c3dcb80bd5dde # Parent 315f31e4f9642b740af9d286866c83ee87e2f901 fetch_weather: Make purge_threshold output some information when debugging. diff -r 315f31e4f964 -r 33b5e7adc30c fetch_weather.pl --- a/fetch_weather.pl Thu Jan 05 23:14:55 2017 +0200 +++ b/fetch_weather.pl Thu Jan 05 23:15:31 2017 +0200 @@ -537,6 +537,7 @@ if ($purge > 0) { my $wqtime = time(); + my $nold = scalar(keys %$weatherdata); foreach my $key (keys %$weatherdata) { @@ -545,6 +546,9 @@ delete $$weatherdata{$key}; } } + + my $nnew = scalar(keys %$weatherdata); + print STDERR "Purged data older than ".$purge." minutes, ".$nold." -> ".$nnew." = ".($nold - $nnew)." removed.\n" if (opt_get_int("debug") > 0); } }