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)
This commit is contained in:
Keith Mitchell
2012-05-16 10:58:28 -07:00
parent 3b1ef62c85
commit 7bc9df1148

View File

@@ -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: