From 5910622a72a3804d6c69ebd236fa5222c46b051e Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Sun, 06 Dec 2009 00:26:30 +0000 Subject: Move blacklist timeout to config.php --- diff --git a/aslo/config.php b/aslo/config.php new file mode 100644 index 0000000..01fd95a --- /dev/null +++ b/aslo/config.php @@ -0,0 +1,17 @@ + diff --git a/aslo/cron/parse_logs b/aslo/cron/parse_logs new file mode 100755 index 0000000..b4b870e --- /dev/null +++ b/aslo/cron/parse_logs @@ -0,0 +1,14 @@ +#!/bin/sh + +root=$(dirname $(dirname $(dirname $(readlink --canonicalize-missing $0)))) + +cd $root/bin + +for type in downloads updatepings; do + php -f parse_logs/parse_logs.php \ + logs=$root/data/ \ + temp=/tmp \ + type=$type \ + date=$(date --date=yesterday +%Y%m%d) \ + geo=US v=v +done diff --git a/bin/parse_logs/count_downloads.class.php b/bin/parse_logs/count_downloads.class.php index 9274654..e74fcf1 100644 --- a/bin/parse_logs/count_downloads.class.php +++ b/bin/parse_logs/count_downloads.class.php @@ -154,7 +154,7 @@ class Count_Downloads { */ function cleanIPs($currentTime) { foreach ($this->countedIPs as $ip => $downloadTime) { - if (($currentTime - $downloadTime) > 30) + if (($currentTime - $downloadTime) > SITE_BLACKLIST_TIMEOUT) unset($this->countedIPs[$ip]); } } -- cgit v0.9.1