From 0e204bdecc9815f66da23c5daf5b7b6bdeb4667a Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Tue, 11 Apr 2017 00:34:21 +0000 Subject: [PATCH] Eased fetch ratelimit --- titanembeds/blueprints/api/api.py | 2 +- titanembeds/static/js/embed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/titanembeds/blueprints/api/api.py b/titanembeds/blueprints/api/api.py index c3603c8..970e147 100644 --- a/titanembeds/blueprints/api/api.py +++ b/titanembeds/blueprints/api/api.py @@ -225,7 +225,7 @@ def get_online_embed_users(guild_id): @api.route("/fetch", methods=["GET"]) @valid_session_required(api=True) -@rate_limiter.limit("1 per 2 second", key_func = channel_ratelimit_key) +@rate_limiter.limit("2 per 2 second", key_func = channel_ratelimit_key) def fetch(): guild_id = request.args.get("guild_id") channel_id = request.args.get('channel_id') diff --git a/titanembeds/static/js/embed.js b/titanembeds/static/js/embed.js index 8119254..aa1a932 100644 --- a/titanembeds/static/js/embed.js +++ b/titanembeds/static/js/embed.js @@ -325,7 +325,7 @@ function run_fetch_routine() { fill_discord_members(guildobj.discordmembers); fill_authenticated_users(guildobj.embedmembers.authenticated); fill_unauthenticated_users(guildobj.embedmembers.unauthenticated); - fetchtimeout = setTimeout(run_fetch_routine, 10000); + fetchtimeout = setTimeout(run_fetch_routine, 5000); }); }); fet.fail(function(data) {