fix(reddit_api): fix reddit ratelimit check
This commit is contained in:
@@ -188,7 +188,7 @@ class RedditAPI(BaseConnector):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if response.status_code == 429:
|
if response.status_code == 429:
|
||||||
wait_time = response.headers.get("Retry-After", backoff)
|
wait_time = response.headers.get("X-Ratelimit-Reset", backoff)
|
||||||
|
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Rate limited by Reddit API. Retrying in {wait_time} seconds..."
|
f"Rate limited by Reddit API. Retrying in {wait_time} seconds..."
|
||||||
|
|||||||
Reference in New Issue
Block a user