From 6f7623a2286f4e7005d1c1fd993ab53d8c2959ca Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Sun, 10 Nov 2024 15:32:18 +0000 Subject: [PATCH] #13 DEFAULT_HTTP_REQ_TIMEOUT to 20 --- src/web-ui/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/web-ui/app.py b/src/web-ui/app.py index 0b6a56f..e1f7da4 100644 --- a/src/web-ui/app.py +++ b/src/web-ui/app.py @@ -13,6 +13,8 @@ IDRAC_HOST = None # noqa: F841 IDRAC_USERNAME = None # noqa: F841 IDRAC_PASSWORD = None # noqa: F841 +HOST_HEALTHCHECK_POLL_IP = None +DEFAULT_HTTP_REQ_TIMEOUT = os.getenv("DEFAULT_HTTP_REQ_TIMEOUT", 20) playwright_working_dir = os.getenv( "PLAYWRIGHT_WORKING_DIR", "../playwright-boostrap/" @@ -50,6 +52,7 @@ def api_call(path=None, method=None, payload=None, raw_payload=False): url, auth=authHeaders, verify=False, + timeout=DEFAULT_HTTP_REQ_TIMEOUT, # noqa: E501 ) elif method == "POST": if raw_payload: @@ -59,6 +62,7 @@ def api_call(path=None, method=None, payload=None, raw_payload=False): verify=False, data=payload, headers={"Content-Type": "application/json"}, + timeout=DEFAULT_HTTP_REQ_TIMEOUT, ) else: req = requests.post(