mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
when rate limited, report for how long
This commit is contained in:
@@ -87,7 +87,7 @@ def ratelimit_exceeded():
|
|||||||
if (now - first) < hist_max_time:
|
if (now - first) < hist_max_time:
|
||||||
if hist_flag:
|
if hist_flag:
|
||||||
hist_flag = False
|
hist_flag = False
|
||||||
chat_write('(rate limited to %d messages in %d seconds)' %(hist_max_count, hist_max_time))
|
chat_write('(rate limited to %d messages in %d seconds, try again at %s)' %(hist_max_count, hist_max_time, time.strftime('%T %Z', time.localtime(hist_ts[0] + hist_max_time))))
|
||||||
|
|
||||||
logger('warn', 'rate limiting exceeded: ' + pickle.dumps(hist_ts))
|
logger('warn', 'rate limiting exceeded: ' + pickle.dumps(hist_ts))
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user