本文整理匯總了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