From 7f0d5871bf4afd4bbe0a5b4a47f62e298d2caa7e Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 21 Oct 2022 19:55:53 -0500 Subject: [PATCH] Improve documentation for wait_on_rate_limit parameter for streaming Resolves part of #1986 --- tweepy/asynchronous/streaming.py | 4 +++- tweepy/streaming.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tweepy/asynchronous/streaming.py b/tweepy/asynchronous/streaming.py index b8bebf5..58eba22 100644 --- a/tweepy/asynchronous/streaming.py +++ b/tweepy/asynchronous/streaming.py @@ -570,7 +570,9 @@ class AsyncStreamingClient(AsyncBaseClient, AsyncBaseStream): return_type : type[dict | requests.Response | Response] Type to return from requests to the API wait_on_rate_limit : bool - Whether to wait when rate limit is reached + Whether or not to wait before retrying when a rate limit is + encountered. This applies to requests besides those that connect to a + stream (see ``max_retries``). max_retries: int | None Number of times to attempt to (re)connect the stream. proxy : str | None diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 9228a9e..145f71d 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -563,7 +563,9 @@ class StreamingClient(BaseClient, BaseStream): return_type : type[dict | requests.Response | Response] Type to return from requests to the API wait_on_rate_limit : bool - Whether to wait when rate limit is reached + Whether or not to wait before retrying when a rate limit is + encountered. This applies to requests besides those that connect to a + stream (see ``max_retries``). chunk_size : int The default socket.read size. Default to 512, less than half the size of a Tweet so that it reads Tweets with the minimal latency of 2 reads -- 2.25.1