Skip to content

Commit

Permalink
(BSR)[API] fix: Remove retry for recommendation API.
Browse files Browse the repository at this point in the history
This has been validated by the data, when are starting to have problems this make it worse.
  • Loading branch information
R0ntheo committed Jul 3, 2024
1 parent a16fae6 commit 918b0f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/src/pcapi/connectors/recommendation.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def _request(self, method: str, path: str, params: dict, body: dict | None = Non
url = "/".join((settings.RECOMMENDATION_API_URL.rstrip("/"), path.lstrip("/")))
try:
if method == "get":
response = requests.get(url, params=params, timeout=HTTP_TIMEOUT)
response = requests.get(url, params=params, timeout=HTTP_TIMEOUT, disable_synchronous_retry=True)
elif method == "post":
response = requests.post(url, params=params, json=body, timeout=HTTP_TIMEOUT)
response = requests.post(
url, params=params, json=body, timeout=HTTP_TIMEOUT, disable_synchronous_retry=True
)
else:
raise ValueError(f"Unexpected method: {method}")
response.raise_for_status()
Expand Down

0 comments on commit 918b0f9

Please sign in to comment.