Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set request HTTP timeout #197

Open
BezBartek opened this issue Nov 9, 2023 · 0 comments
Open

Ability to set request HTTP timeout #197

BezBartek opened this issue Nov 9, 2023 · 0 comments

Comments

@BezBartek
Copy link

BezBartek commented Nov 9, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant