mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-01 02:05:03 -05:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user