aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorMaciej Skrocki <maciej.skrocki@intel.com>2017-09-19 14:00:53 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-21 00:41:31 +0000
commitc039fecf1c533b09286b0eec89ddc13862b3d452 (patch)
treedd640db085b5fc873c985fd0601dbc70e0cd2b0c /api
parent661d78e5ad9a831a4e6c36287d17ff6829b062d0 (diff)
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 <maciej.skrocki@intel.com>
Diffstat (limited to 'api')
-rw-r--r--api/resources/v1/env.py2
1 files changed, 1 insertions, 1 deletions
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