GetStream / stream-python

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

add api request retries #4

Closed tbarbugli closed 9 years ago

tbarbugli commented 10 years ago

What about we retry (3 times?) failed requests to APIs?

requests comes with a simple retry mechanism: http://stackoverflow.com/questions/15431044/can-i-set-max-retries-for-requests-request unfortunately retries requests are done immediately after the failure.

perhaps it makes more sense to have retries sleeping an increasing amount of time between each other (eg. 0.5s; 1s; 2s; 4s; 8s; fail)

tschellenbach commented 10 years ago

yes that makes sense, good idea