Skip to content

Commit dba78c1

Browse files
update default execution timeout
1 parent cb97acd commit dba78c1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/parallel/_constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
66
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
77

8+
# default timeout for execution requests which wait for results is 1 hour.
9+
DEFAULT_EXECUTE_TIMEOUT_SECONDS = 3600
810
# default timeout for http requests is 10 minutes.
911
DEFAULT_TIMEOUT_SECONDS = 600
1012
DEFAULT_TIMEOUT = httpx.Timeout(timeout=DEFAULT_TIMEOUT_SECONDS, connect=5.0)

src/parallel/lib/_time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import httpx
66

77
from .._types import NotGiven
8-
from .._constants import DEFAULT_TIMEOUT_SECONDS
8+
from .._constants import DEFAULT_EXECUTE_TIMEOUT_SECONDS
99
from .._exceptions import APIStatusError, APITimeoutError
1010
from .._utils._utils import is_given
1111

@@ -19,7 +19,7 @@ def prepare_timeout_float(timeout: Union[float, httpx.Timeout, None, NotGiven])
1919
timeout = timeout.read
2020

2121
if not is_given(timeout) or timeout is None:
22-
return DEFAULT_TIMEOUT_SECONDS
22+
return DEFAULT_EXECUTE_TIMEOUT_SECONDS
2323

2424
return timeout
2525

0 commit comments

Comments
 (0)