Skip to content

Commit 9767ef0

Browse files
committed
feat: preparing for not cloud warning
1 parent bab51a4 commit 9767ef0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

influxdb_client/service/_base_service.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def __init__(self, api_client=None):
88
if api_client is None:
99
raise ValueError("Invalid value for `api_client`, must be defined.")
1010
self.api_client = api_client
11+
self._build_type = None
1112

1213
def _check_operation_params(self, operation_id, supported_params, local_params):
1314
supported_params.append('async_req')
@@ -25,10 +26,14 @@ def _check_operation_params(self, operation_id, supported_params, local_params):
2526
del local_params['kwargs']
2627

2728
def _is_cloud_instance(self) -> bool:
28-
return False
29+
if not self._build_type:
30+
self._build_type = self.build_type()
31+
return 'cloud' in self._build_type.lower()
2932

3033
async def _is_cloud_instance_async(self) -> bool:
31-
return False
34+
if not self._build_type:
35+
self._build_type = await self.build_type_async()
36+
return 'cloud' in self._build_type.lower()
3237

3338
def build_type(self) -> str:
3439
"""

0 commit comments

Comments
 (0)