Don't send ok result when update is queued

This commit is contained in:
shortcutme 2017-10-03 15:19:34 +02:00
parent 636813c603
commit 628cc992e9
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -73,9 +73,6 @@ class FileRequest(object):
if cmd == "update":
event = "%s update %s %s" % (self.connection.id, params["site"], params["inner_path"])
if not RateLimit.isAllowed(event): # There was already an update for this file in the last 10 second
time.sleep(5)
self.response({"ok": "File update queued"})
# If called more than once within 15 sec only keep the last update
RateLimit.callAsync(event, max(self.connection.bad_actions, 15), self.actionUpdate, params)
else: