|
39 | 39 | devbox_write_file_contents_params, |
40 | 40 | ) |
41 | 41 | from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes |
42 | | -from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform |
| 42 | +from ..._utils import is_given, extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform |
43 | 43 | from .browsers import ( |
44 | 44 | BrowsersResource, |
45 | 45 | AsyncBrowsersResource, |
|
80 | 80 | async_to_custom_raw_response_wrapper, |
81 | 81 | async_to_custom_streamed_response_wrapper, |
82 | 82 | ) |
| 83 | +from ..._constants import DEFAULT_TIMEOUT |
83 | 84 | from ...pagination import ( |
84 | 85 | SyncDevboxesCursorIDPage, |
85 | 86 | AsyncDevboxesCursorIDPage, |
@@ -791,6 +792,8 @@ def execute_sync( |
791 | 792 | """ |
792 | 793 | if not id: |
793 | 794 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
| 795 | + if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: |
| 796 | + timeout = 600 |
794 | 797 | return self._post( |
795 | 798 | f"/v1/devboxes/{id}/execute_sync", |
796 | 799 | body=maybe_transform( |
@@ -1128,6 +1131,8 @@ def snapshot_disk( |
1128 | 1131 | """ |
1129 | 1132 | if not id: |
1130 | 1133 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
| 1134 | + if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: |
| 1135 | + timeout = 600 |
1131 | 1136 | return self._post( |
1132 | 1137 | f"/v1/devboxes/{id}/snapshot_disk", |
1133 | 1138 | body=maybe_transform( |
@@ -1984,6 +1989,8 @@ async def execute_sync( |
1984 | 1989 | """ |
1985 | 1990 | if not id: |
1986 | 1991 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
| 1992 | + if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: |
| 1993 | + timeout = 600 |
1987 | 1994 | return await self._post( |
1988 | 1995 | f"/v1/devboxes/{id}/execute_sync", |
1989 | 1996 | body=await async_maybe_transform( |
@@ -2321,6 +2328,8 @@ async def snapshot_disk( |
2321 | 2328 | """ |
2322 | 2329 | if not id: |
2323 | 2330 | raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") |
| 2331 | + if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: |
| 2332 | + timeout = 600 |
2324 | 2333 | return await self._post( |
2325 | 2334 | f"/v1/devboxes/{id}/snapshot_disk", |
2326 | 2335 | body=await async_maybe_transform( |
|
0 commit comments