@@ -59,6 +59,7 @@ class Gcore(SyncAPIClient):
5959 cloud_project_id : int | None
6060 cloud_region_id : int | None
6161 cloud_polling_interval_seconds : int | None
62+ cloud_polling_timeout_seconds : int | None
6263
6364 def __init__ (
6465 self ,
@@ -67,6 +68,7 @@ def __init__(
6768 cloud_project_id : int | None = None ,
6869 cloud_region_id : int | None = None ,
6970 cloud_polling_interval_seconds : int | None = 3 ,
71+ cloud_polling_timeout_seconds : int | None = 7200 ,
7072 base_url : str | httpx .URL | None = None ,
7173 timeout : float | Timeout | None | NotGiven = not_given ,
7274 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -113,6 +115,10 @@ def __init__(
113115 cloud_polling_interval_seconds = 3
114116 self .cloud_polling_interval_seconds = cloud_polling_interval_seconds
115117
118+ if cloud_polling_timeout_seconds is None :
119+ cloud_polling_timeout_seconds = 7200
120+ self .cloud_polling_timeout_seconds = cloud_polling_timeout_seconds
121+
116122 if base_url is None :
117123 base_url = os .environ .get ("GCORE_BASE_URL" )
118124 if base_url is None :
@@ -168,6 +174,7 @@ def copy(
168174 cloud_project_id : int | None = None ,
169175 cloud_region_id : int | None = None ,
170176 cloud_polling_interval_seconds : int | None = None ,
177+ cloud_polling_timeout_seconds : int | None = None ,
171178 base_url : str | httpx .URL | None = None ,
172179 timeout : float | Timeout | None | NotGiven = not_given ,
173180 http_client : httpx .Client | None = None ,
@@ -205,6 +212,7 @@ def copy(
205212 cloud_project_id = cloud_project_id or self .cloud_project_id ,
206213 cloud_region_id = cloud_region_id or self .cloud_region_id ,
207214 cloud_polling_interval_seconds = cloud_polling_interval_seconds or self .cloud_polling_interval_seconds ,
215+ cloud_polling_timeout_seconds = cloud_polling_timeout_seconds or self .cloud_polling_timeout_seconds ,
208216 base_url = base_url or self .base_url ,
209217 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
210218 http_client = http_client ,
@@ -288,6 +296,7 @@ class AsyncGcore(AsyncAPIClient):
288296 cloud_project_id : int | None
289297 cloud_region_id : int | None
290298 cloud_polling_interval_seconds : int | None
299+ cloud_polling_timeout_seconds : int | None
291300
292301 def __init__ (
293302 self ,
@@ -296,6 +305,7 @@ def __init__(
296305 cloud_project_id : int | None = None ,
297306 cloud_region_id : int | None = None ,
298307 cloud_polling_interval_seconds : int | None = 3 ,
308+ cloud_polling_timeout_seconds : int | None = 7200 ,
299309 base_url : str | httpx .URL | None = None ,
300310 timeout : float | Timeout | None | NotGiven = not_given ,
301311 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -342,6 +352,10 @@ def __init__(
342352 cloud_polling_interval_seconds = 3
343353 self .cloud_polling_interval_seconds = cloud_polling_interval_seconds
344354
355+ if cloud_polling_timeout_seconds is None :
356+ cloud_polling_timeout_seconds = 7200
357+ self .cloud_polling_timeout_seconds = cloud_polling_timeout_seconds
358+
345359 if base_url is None :
346360 base_url = os .environ .get ("GCORE_BASE_URL" )
347361 if base_url is None :
@@ -397,6 +411,7 @@ def copy(
397411 cloud_project_id : int | None = None ,
398412 cloud_region_id : int | None = None ,
399413 cloud_polling_interval_seconds : int | None = None ,
414+ cloud_polling_timeout_seconds : int | None = None ,
400415 base_url : str | httpx .URL | None = None ,
401416 timeout : float | Timeout | None | NotGiven = not_given ,
402417 http_client : httpx .AsyncClient | None = None ,
@@ -434,6 +449,7 @@ def copy(
434449 cloud_project_id = cloud_project_id or self .cloud_project_id ,
435450 cloud_region_id = cloud_region_id or self .cloud_region_id ,
436451 cloud_polling_interval_seconds = cloud_polling_interval_seconds or self .cloud_polling_interval_seconds ,
452+ cloud_polling_timeout_seconds = cloud_polling_timeout_seconds or self .cloud_polling_timeout_seconds ,
437453 base_url = base_url or self .base_url ,
438454 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
439455 http_client = http_client ,
0 commit comments