Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 985e4b7

Browse files
authoredMar 10, 2025··
pipeline/http: self_test() with a 5s timeout (#1558)
Ensure the `self_test()` won't take too much time and penalize the other checks. `requests` doesn't have any default timeout and relies on the settings of the system. See: psf/requests#3070
1 parent 340c001 commit 985e4b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎ansible_ai_connect/ai/api/model_pipelines/http/pipelines.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def self_test(self) -> Optional[HealthCheckSummary]:
140140
)
141141
try:
142142
headers = {"Content-Type": "application/json"}
143-
r = requests.get(self.config.inference_url + "/readiness", headers=headers)
143+
r = requests.get(self.config.inference_url + "/readiness", headers=headers, timeout=5)
144144
r.raise_for_status()
145145

146146
data = r.json()

0 commit comments

Comments
 (0)
Please sign in to comment.