Closed timoha closed 5 months ago
Hi @timoha! Thank you for your contribution. PR overall looks good. Can you please sign the commit before we merge it?
Hi @timoha! Thank you for your contribution. PR overall looks good. Can you please sign the commit before we merge it?
thank you, signed-off! Updated tests as well.
run make fmt-fix
to fix the python formatting
Hey @timoha! I have merged your commit through the internal pipeline. I have also made a release of PyPI that has you changes - https://pypi.org/project/aistore/1.4.22/
Thank you for your contribution!
By default internally used requests library doesn't set any timeouts which means that if server doesn't reply to request, call will just hang.
We've run into this issue on our cluster and need an ability to have requests fail after some time of inactivity.
In general, it's a good practice to set default timeouts for any clients that do requests over network. This change introduces an option to set a timeouts as a float, or a (connect timeout, read timeout) tuple that will be applied to all requests done by the client.
The default remains as None to keep backwards compatibility.
Their documentation requests also recommends setting timeouts to most external request: https://requests.readthedocs.io/en/latest/user/advanced/#timeouts