本文整理汇总了Python中google.api_core.retry.Retry方法的典型用法代码示例。如果您正苦于以下问题:Python retry.Retry方法的具体用法?Python retry.Retry怎么用?Python retry.Retry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类google.api_core.retry
的用法示例。
在下文中一共展示了retry.Retry方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
project_id: str,
region: str,
cluster_name: str,
cluster_uuid: Optional[str] = None,
request_id: Optional[str] = None,
retry: Optional[Retry] = None,
timeout: Optional[float] = None,
metadata: Optional[Sequence[Tuple[str, str]]] = None,
gcp_conn_id: str = "google_cloud_default",
*args,
**kwargs
):
super().__init__(*args, **kwargs)
self.project_id = project_id
self.region = region
self.cluster_name = cluster_name
self.cluster_uuid = cluster_uuid
self.request_id = request_id
self.retry = retry
self.timeout = timeout
self.metadata = metadata
self.gcp_conn_id = gcp_conn_id
示例2: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
input_uri: str,
input_content: Optional[bytes] = None,
output_uri: Optional[str] = None,
video_context: Union[Dict, VideoContext] = None,
location: Optional[str] = None,
retry: Optional[Retry] = None,
timeout: Optional[float] = None,
gcp_conn_id: str = "google_cloud_default",
*args,
**kwargs
) -> None:
super().__init__(*args, **kwargs)
self.input_uri = input_uri
self.input_content = input_content
self.output_uri = output_uri
self.video_context = video_context
self.location = location
self.retry = retry
self.gcp_conn_id = gcp_conn_id
self.timeout = timeout
示例3: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
model: dict,
location: str,
project_id: Optional[str] = None,
metadata: Optional[MetaData] = None,
timeout: Optional[float] = None,
retry: Optional[Retry] = None,
gcp_conn_id: str = "google_cloud_default",
*args,
**kwargs
) -> None:
super().__init__(*args, **kwargs)
self.model = model
self.location = location
self.project_id = project_id
self.metadata = metadata
self.timeout = timeout
self.retry = retry
self.gcp_conn_id = gcp_conn_id
示例4: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
transfer_config: dict,
project_id: Optional[str] = None,
authorization_code: Optional[str] = None,
retry: Retry = None,
timeout: Optional[float] = None,
metadata: Optional[Sequence[Tuple[str, str]]] = None,
gcp_conn_id="google_cloud_default",
*args,
**kwargs
):
super().__init__(*args, **kwargs)
self.transfer_config = transfer_config
self.authorization_code = authorization_code
self.project_id = project_id
self.retry = retry
self.timeout = timeout
self.metadata = metadata
self.gcp_conn_id = gcp_conn_id
示例5: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
document: Union[dict, Document],
encoding_type: Optional[enums.EncodingType] = None,
retry: Optional[Retry] = None,
timeout: Optional[float] = None,
metadata: Optional[MetaData] = None,
gcp_conn_id: str = "google_cloud_default",
*args,
**kwargs
) -> None:
super().__init__(*args, **kwargs)
self.document = document
self.encoding_type = encoding_type
self.retry = retry
self.timeout = timeout
self.metadata = metadata
self.gcp_conn_id = gcp_conn_id
示例6: __init__
# 需要导入模块: from google.api_core import retry [as 别名]
# 或者: from google.api_core.retry import Retry [as 别名]
def __init__(
self,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
deidentify_template: Optional[Union[Dict, DeidentifyTemplate]] = None,
template_id: Optional[str] = None,
retry: Optional[Retry] = None,
timeout: Optional[float] = None,
metadata: Optional[Sequence[Tuple[str, str]]] = None,
gcp_conn_id: str = "google_cloud_default",
*args,
**kwargs
) -> None:
super().__init__(*args, **kwargs)
self.organization_id = organization_id
self.project_id = project_id
self.deidentify_template = deidentify_template
self.template_id = template_id
self.retry = retry
self.timeout = timeout
self.metadata = metadata
self.gcp_conn_id = gcp_conn_id