python-arango
python-arango copied to clipboard
Add 'read_timeout' option in HTTP Client
from the link : https://docs.python-arango.com/en/main/http.html
Hi, I'm using python-arango well, and thanks for the nice library.
I'm upserting bulk documents into ArangoDB, and it often exceed 60 seconds which is default of python requests' time out option.
However, in order to increase the read timeout, I have to implement the whole Custom HTTP according to the guided url(https://docs.python-arango.com/en/main/http.html).
I think it would be nice if it's implemented in ArangoClient(). THanks.
Hi @ud803,
I'll keep this open as a feature request.
@ud803 Here is an easy way to get around this for now:
from arango.http import DefaultHTTPClient
class NoTimeoutHttpClient(DefaultHTTPClient):
"""Extend the default arango http client, to remove timeouts for bulk data."""
REQUEST_TIMEOUT = None
# Create client with no timeout
client = ArangoClient(hosts=<hosts>, http_client=NoTimeoutHttpClient())
Resolved with https://github.com/ArangoDB-Community/python-arango/pull/213. Thanks @tjoubert!