This module contains a Google Cloud Task sensor.

Module Contents



Pulls tasks count from a cloud task queue.

class*, location, project_id=None, 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. Always waits for queue returning tasks count as 0.

  • project_id (str | None) – 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]

Function defined by the sensors while deriving this class should override.

Was this entry helpful?