Reduce extra sleep time for rate limit handling in APIMethod.execute
authorHarmon <Harmon758@gmail.com>
Wed, 6 Jan 2021 20:15:09 +0000 (14:15 -0600)
committerHarmon <Harmon758@gmail.com>
Wed, 6 Jan 2021 20:15:09 +0000 (14:15 -0600)
Resolves #1049

tweepy/binder.py

index cfa437f95c08ec30474ae4db6accdfd7a8ddb887..0597b3cb8fe0ae3174127e14f67caa93af9c1a5d 100644 (file)
@@ -157,7 +157,7 @@ def bind_api(**config):
                     if sleep_time > 0:
                         if self.wait_on_rate_limit_notify:
                             log.warning("Rate limit reached. Sleeping for: %d" % sleep_time)
-                        time.sleep(sleep_time + 5)  # Sleep for few extra sec
+                        time.sleep(sleep_time + 1)  # Sleep for extra sec
 
                 # Apply authentication
                 auth = None