airflow.providers.google.cloud.sensors.workflows

模組內容

類別

WorkflowExecutionSensor

檢查給定 workflow_idexecution_id 的執行狀態。

class airflow.providers.google.cloud.sensors.workflows.WorkflowExecutionSensor(*, workflow_id, execution_id, location, project_id=PROVIDE_PROJECT_ID, success_states=None, failure_states=None, retry=DEFAULT, request_timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[原始碼]

基底類別: airflow.sensors.base.BaseSensorOperator

檢查給定 workflow_idexecution_id 的執行狀態。

參數
  • workflow_id (str) – 必填。工作流程的 ID。

  • execution_id (str) – 必填。執行的 ID。

  • project_id (str) – 必填。叢集所屬的 Google Cloud 專案 ID。

  • location (str) – 必填。處理請求的 Cloud Dataproc 區域。

  • success_states (set[google.cloud.workflows.executions_v1beta.Execution.State] | None) – 要視為成功的執行狀態,預設僅為 SUCCEEDED 狀態

  • failure_states (set[google.cloud.workflows.executions_v1beta.Execution.State] | None) – 要視為失敗的執行狀態,預設為 FAILEDCANCELLED 狀態。

  • retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 用於重試請求的重試物件。如果指定 None,則不會重試請求。

  • request_timeout (float | None) – 等待請求完成的秒數。請注意,如果指定 retry,則逾時適用於每次個別嘗試。

  • metadata (collections.abc.Sequence[tuple[str, str]]) – 提供給方法的其他 metadata。

template_fields: collections.abc.Sequence[str] = ('location', 'workflow_id', 'execution_id')[原始碼]
poke(context)[原始碼]

在衍生此類別時覆寫。

此條目是否有幫助?