packethost / packet-python

A Python client for the Equinix Metal API
http://metal.equinix.com/
GNU Lesser General Public License v3.0
40 stars 50 forks source link

There shoud be a reasonable, default timeout #107

Open grahamc opened 3 years ago

grahamc commented 3 years ago

Plus, it'd be great to have it be settable. Just today I noticed a process blocked trying to talk to the EM API for 33 hours.

displague commented 3 years ago

This sounds reasonable. https://docs.python-requests.org/en/master/user/advanced/#timeouts offers the means to do this.

I think we would want to introduce this on a call-by-call basis via call_api, https://github.com/packethost/packet-python/blob/v1.44.0/packet/baseapi.py#L47. Perhaps adding an extra argument.

WeijuZheng commented 2 years ago

Will this issue be fixed soon? If not, any work around to set a timeout for all the request?