Skip to content

Commit 325b0d3

Browse files
fix(cloud): use generic polling options in tasks
1 parent 65ef255 commit 325b0d3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/gcore/resources/cloud/tasks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def poll(
6161
timeout: float | NotGiven = NOT_GIVEN,
6262
) -> Task:
6363
if not is_given(polling_interval_seconds):
64-
polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
64+
polling_interval_seconds = cast(int, self._client.polling_interval_seconds)
6565
# Ensure the polling interval is at least 1 second
6666
polling_interval_seconds = max(1, polling_interval_seconds)
6767

6868
if not is_given(polling_timeout_seconds):
69-
polling_timeout_seconds = cast(int, self._client.cloud_polling_timeout_seconds)
69+
polling_timeout_seconds = cast(int, self._client.polling_timeout_seconds)
7070

7171
if polling_timeout_seconds <= polling_interval_seconds:
7272
raise ValueError(
@@ -383,12 +383,12 @@ async def poll(
383383
timeout: float | NotGiven = NOT_GIVEN,
384384
) -> Task:
385385
if not is_given(polling_interval_seconds):
386-
polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
386+
polling_interval_seconds = cast(int, self._client.polling_interval_seconds)
387387
# Ensure the polling interval is at least 1 second
388388
polling_interval_seconds = max(1, polling_interval_seconds)
389389

390390
if not is_given(polling_timeout_seconds):
391-
polling_timeout_seconds = cast(int, self._client.cloud_polling_timeout_seconds)
391+
polling_timeout_seconds = cast(int, self._client.polling_timeout_seconds)
392392

393393
if polling_timeout_seconds <= polling_interval_seconds:
394394
raise ValueError(

0 commit comments

Comments
 (0)