Version 0.3.2, rev351, Sidebar to display site infos an modify settings, Per-site upload/download bytes statistics, Deny different origin media requests, Allow 10sec to finish query modifications, Websocket display errors to client instead of disconnecting, Allow specify notification id to server-side messages, Track every command response time
This commit is contained in:
parent
b1c5b7d3a3
commit
b83d6ba2ff
43 changed files with 8104 additions and 39 deletions
|
@ -78,14 +78,14 @@ def call(event, allowed_again=10, func=None, *args, **kwargs):
|
|||
|
||||
|
||||
# Cleanup expired events every 3 minutes
|
||||
def cleanup():
|
||||
def rateLimitCleanup():
|
||||
while 1:
|
||||
expired = time.time() - 60 * 2 # Cleanup if older than 2 minutes
|
||||
for event in called_db.keys():
|
||||
if called_db[event] < expired:
|
||||
del called_db[event]
|
||||
time.sleep(60 * 3) # Every 3 minutes
|
||||
gevent.spawn(cleanup)
|
||||
gevent.spawn(rateLimitCleanup)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue