From bc0dd2e225f85c4a16629197c8e7a480a1134706 Mon Sep 17 00:00:00 2001 From: Maciej Skrocki Date: Tue, 19 Sep 2017 14:00:53 -0700 Subject: Introduced timeout to post method of HttpClient We seen cases where grafana container bring-up code would fail, because of too quick access to the http api. Added 10sec timeout for the first query of the API. Change-Id: Ifc95a626d0ab5552a1f26fb167fc3f65791392d7 Signed-off-by: Maciej Skrocki --- api/resources/v1/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py index 47ea91643..04cc659c7 100644 --- a/api/resources/v1/env.py +++ b/api/resources/v1/env.py @@ -123,7 +123,7 @@ class V1Env(ApiResource): "isDefault": True, } try: - HttpClient().post(url, data) + HttpClient().post(url, data, timeout=10) except Exception: LOG.exception('Create datasources failed') raise -- cgit 1.2.3-korg