Skip to content

Commit 86f4c72

Browse files
Issue #441 Add automatic retry to RestApiConnection's request session
1 parent d68747c commit 86f4c72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openeo/rest/connection.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
OidcResourceOwnerPasswordAuthenticator,
4747
)
4848
from openeo.rest.datacube import DataCube, InputDate
49+
from openeo.rest.http import requests_with_retry
4950
from openeo.rest.job import BatchJob, RESTJob
5051
from openeo.rest.mlmodel import MlModel
5152
from openeo.rest.rest_capabilities import RESTCapabilities
@@ -85,7 +86,8 @@ def __init__(
8586
):
8687
self._root_url = root_url
8788
self.auth = auth or NullAuth()
88-
self.session = session or requests.Session()
89+
# TODO: #441 [WIP] Add requests_with_retry here to the session?
90+
self.session = session or requests_with_retry()
8991
self.default_timeout = default_timeout or DEFAULT_TIMEOUT
9092
self.default_headers = {
9193
"User-Agent": "openeo-python-client/{cv} {py}/{pv} {pl}".format(

0 commit comments

Comments
 (0)