From c29bc2cf3198249e20e2c749ac7363de12e93b60 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 16 Dec 2012 12:02:50 +0100 Subject: [PATCH 1/1] increase penalty for search requests --- utils/cron_banip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/cron_banip.py b/utils/cron_banip.py index 4cc50fc5..12595b21 100755 --- a/utils/cron_banip.py +++ b/utils/cron_banip.py @@ -107,7 +107,7 @@ cur = conn.cursor() cur.execute(""" SELECT ipaddress, max(count) FROM ((SELECT * FROM - (SELECT ipaddress, sum(CASE WHEN type = 'search' THEN 2 ELSE 1 END) as count FROM new_query_log + (SELECT ipaddress, sum(CASE WHEN type = 'search' THEN 3 ELSE 1 END) as count FROM new_query_log WHERE starttime > now() - interval '1 hour' GROUP BY ipaddress) as i WHERE count > %s) UNION -- 2.39.5