GetStream / stream-python

Python Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
141 stars 41 forks source link

Verify request retry behaviour of requests #13

Closed tschellenbach closed 8 years ago

tbarbugli commented 8 years ago

few thoughts:

matthisk commented 8 years ago

For fine grain control over retries we should use urllibr Retry class. When passing an instance of this class to max_retries on HTTPAdapter you can control retry behavior.

According to the docs this behavior only applies to failed connections and timeouts, but I guess if you supply an instance of the Retry class you can have more control:

max_retries (int) – The maximum number of retries each connection should attempt. Note, this applies only to failed connections and timeouts, never to requests where the server returns a response.