Skip to content

Commit

Permalink
fix(specs): endpoint level timeout for ingestion (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4251

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Dec 18, 2024
1 parent 05ac319 commit 93852df
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
7 changes: 4 additions & 3 deletions algoliasearch/http/request_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def merge(
query_parameters: Optional[Dict[str, Any]] = None,
headers: Optional[Dict[str, str]] = None,
data: Optional[str] = None,
timeouts: Dict[str, int] = {},
user_request_options: Optional[Union[Self, Dict[str, Any]]] = None,
) -> Self:
"""
Expand All @@ -74,9 +75,9 @@ def merge(
"headers": headers,
"query_parameters": query_parameters,
"timeouts": {
"read": self._config.read_timeout,
"write": self._config.write_timeout,
"connect": self._config.connect_timeout,
"read": timeouts.get("read", self._config.read_timeout),
"write": timeouts.get("write", self._config.write_timeout),
"connect": timeouts.get("connect", self._config.connect_timeout),
},
"data": data,
}
Expand Down
40 changes: 40 additions & 0 deletions algoliasearch/ingestion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3512,6 +3512,11 @@ async def push_task_with_http_info(
request_options=self._request_options.merge(
query_parameters=_query_parameters,
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -4144,6 +4149,11 @@ async def trigger_docker_source_discover_with_http_info(
"{sourceID}", quote(str(source_id), safe="")
),
request_options=self._request_options.merge(
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -4783,6 +4793,11 @@ async def validate_source_with_http_info(
path="/1/sources/validate",
request_options=self._request_options.merge(
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -4854,6 +4869,11 @@ async def validate_source_before_update_with_http_info(
),
request_options=self._request_options.merge(
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -8267,6 +8287,11 @@ def push_task_with_http_info(
request_options=self._request_options.merge(
query_parameters=_query_parameters,
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -8899,6 +8924,11 @@ def trigger_docker_source_discover_with_http_info(
"{sourceID}", quote(str(source_id), safe="")
),
request_options=self._request_options.merge(
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -9534,6 +9564,11 @@ def validate_source_with_http_info(
path="/1/sources/validate",
request_options=self._request_options.merge(
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down Expand Up @@ -9605,6 +9640,11 @@ def validate_source_before_update_with_http_info(
),
request_options=self._request_options.merge(
data=dumps(body_serializer(_data)),
timeouts={
"read": 180000,
"write": 180000,
"connect": 180000,
},
user_request_options=request_options,
),
use_read_transporter=False,
Expand Down

0 comments on commit 93852df

Please sign in to comment.