Skip to content

Commit

Permalink
feat: use env_vars for TIMEOUT_STREAMING (#1527)
Browse files Browse the repository at this point in the history
* feat: use env_vars for TIMEOUT_STREAMING

* fix lint

* fix misnamed variable

* fix lint
  • Loading branch information
paaragon authored Oct 30, 2024
1 parent f96e432 commit 624de75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion client/qiskit_serverless/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 624de75

Please sign in to comment.