From 9f7353520449b331a0da2956d2407f6f6b717cfa 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 1e860b8..290193d 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/" @@ -187,6 +189,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: @@ -196,6 +199,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(