]> git.openstreetmap.org Git - nominatim.git/commitdiff
tweak block limits
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 12 Apr 2013 21:30:09 +0000 (23:30 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 12 Apr 2013 21:30:09 +0000 (23:30 +0200)
utils/cron_banip.py

index 4fe3064085b655e5862dc65ea0574e9ca6a105ae..b5944a215789b0ab3f13f8490389ad5b853c0225 100755 (executable)
@@ -109,7 +109,7 @@ dbload = int(cur.fetchone()[0])
 BLOCK_LIMIT = max(BLOCK_LOWER, BLOCK_UPPER - BLOCK_LOADFAC * (dbload - 75))
 BULKLONG_LIMIT = max(BULK_LOWER, BULKLONG_LIMIT - BULK_LOADFAC * (avgload - 14))
 if len(prevbulks) > 85:
-    BLOCK_LIMIT = BLOCK_LOWER
+    BLOCK_LIMIT = max(3600, BLOCK_LOWER - (len(prevbulks) - 85)*10)
 
 # get the new block candidates
 cur.execute("""