From 7bc9df1148ab9c079c63277ea9b0188328263270 Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Wed, 16 May 2012 10:58:28 -0700 Subject: [PATCH] morechildren log notice should notify less often Now only notifies if user exceeds the "1 request per 2 seconds" rule in a 30 second period (i.e., 16+ hits in 30 seconds) --- r2/r2/controllers/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index f8c666edb..79930d026 100755 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -1774,7 +1774,9 @@ class ApiController(RedditController): g.cache.set(mc_key, 1, time=30) count = 1 - if count >= 10: + # Anything above 15 hits in 30 seconds violates the + # "1 request per 2 seconds" rule of the API + if count > 15: if user: name = user.name else: