pyTigerGraph icon indicating copy to clipboard operation
pyTigerGraph copied to clipboard

Ability to set request HTTP timeout

Open BezBartek opened this issue 2 years ago • 0 comments

Sometimes, TG partly crashes, there are communication issues or TG internal timeout does not work (no response after timeout time).

What I propose: Give an ability to provide HTTP timeout option. The existing timeout parameter still would be a TG internal timeout (no changes), and http_timout would be a new parameter, that will be passed to requests.request call as timeout.

Example: conn.getVertices(..., timout=10, http_timeout=(10, 20))

Therefore: in the library _req method, instead of: requests.request(method, url, headers=_headers, json=_data, params=params, verify=verify) would be: requests.request(method, url, headers=_headers, json=_data, params=params, verify=verify, timeout=http_timeout)

BezBartek avatar Nov 09 '23 23:11 BezBartek