From 624de75ad0a58f82b1eb9b76955abd3d725016ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Arag=C3=B3n?= Date: Wed, 30 Oct 2024 12:12:05 +0100 Subject: [PATCH] feat: use env_vars for TIMEOUT_STREAMING (#1527) * feat: use env_vars for TIMEOUT_STREAMING * fix lint * fix misnamed variable * fix lint --- client/qiskit_serverless/core/constants.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/qiskit_serverless/core/constants.py b/client/qiskit_serverless/core/constants.py index 73e2ac51e..e63682e71 100644 --- a/client/qiskit_serverless/core/constants.py +++ b/client/qiskit_serverless/core/constants.py @@ -23,8 +23,9 @@ # request timeout REQUESTS_TIMEOUT: int = 30 -REQUESTS_STREAMING_TIMEOUT: int = 60 REQUESTS_TIMEOUT_OVERRIDE = "REQUESTS_TIMEOUT_OVERRIDE" +REQUESTS_STREAMING_TIMEOUT: int = 60 +REQUESTS_STREAMING_TIMEOUT_OVERRIDE = "REQUESTS_TIMEOUT_OVERRIDE" # gateway ENV_GATEWAY_PROVIDER_HOST = "ENV_GATEWAY_PROVIDER_HOST" @@ -49,6 +50,13 @@ REQUESTS_TIMEOUT = int( os.getenv(REQUESTS_TIMEOUT_OVERRIDE, default=str(REQUESTS_TIMEOUT)) ) + +REQUESTS_STREAMING_TIMEOUT = int( + os.getenv( + REQUESTS_STREAMING_TIMEOUT_OVERRIDE, default=str(REQUESTS_STREAMING_TIMEOUT) + ) +) + MAX_ARTIFACT_FILE_SIZE_MB = int( os.getenv( MAX_ARTIFACT_FILE_SIZE_MB_OVERRIDE, default=str(MAX_ARTIFACT_FILE_SIZE_MB)