wc-api-python
wc-api-python copied to clipboard
timeout increased to 10sec
before timeout set to 5sec its very low some times if network is not good getting this error :
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='......', port=....): Read timed out. (read timeout=5)
for every two request i am getting this problem so i increased the timeout to 10 sec...
Thank you.
no need to change the default value; it is possible to create an instance with a timeout=10
wcapi = API(
url="http://example.com",
consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
version="wc/v3",
timeout=10
)
no need to change the default value; it is possible to create an instance with a timeout=10
wcapi = API(
url="http://example.com",
consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
version="wc/v3",
timeout=10
)
It would also be nice if there would be a retry mechanism for when you get a 443 (timeout) after all