From 55dad3fa32e52be4868afd46c7f96a78cb5f9737 Mon Sep 17 00:00:00 2001 From: Justin Warren Date: Fri, 13 Jan 2023 17:12:23 +1100 Subject: [PATCH] Aligned API call rate limit with server default. --- src/fediblockhole/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fediblockhole/__init__.py b/src/fediblockhole/__init__.py index a13f27c..9977dc9 100755 --- a/src/fediblockhole/__init__.py +++ b/src/fediblockhole/__init__.py @@ -29,7 +29,8 @@ URL_BLOCKLIST_MAXSIZE = 1024 ** 3 REQUEST_TIMEOUT = 30 # Time to wait between instance API calls to we don't melt them -API_CALL_DELAY = 3600 / 300 # 300 API calls per hour +# The default Mastodon rate limit is 300 calls per 5 minutes +API_CALL_DELAY = 5 * 60 / 300 # 300 calls per 5 minutes # We always import the domain and the severity IMPORT_FIELDS = ['domain', 'severity']