Skip to content

Commit

Permalink
#13 DEFAULT_HTTP_REQ_TIMEOUT to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Nov 23, 2024
1 parent d1b29e2 commit 9f73535
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/web-ui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down Expand Up @@ -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:
Expand All @@ -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(
Expand Down

0 comments on commit 9f73535

Please sign in to comment.