airflow.providers.google.cloud.sensors.tasks

This module contains a Google Cloud Task sensor.

Module Contents

Classes

TaskQueueEmptySensor

Pulls tasks count from a cloud task queue; waits for queue to return task count as 0.

class airflow.providers.google.cloud.sensors.tasks.TaskQueueEmptySensor(*, location, project_id=PROVIDE_PROJECT_ID, queue_name=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Pulls tasks count from a cloud task queue; waits for queue to return task count as 0.

Parameters
  • project_id (str) – the Google Cloud project ID for the subscription (templated)

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • queue_name (str | None) – The queue name to for which task empty sensing is required.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('project_id', 'location', 'queue_name', 'gcp_conn_id', 'impersonation_chain')[source]
poke(context)[source]

Override when deriving this class.

Was this entry helpful?