airflow.providers.google.common.hooks.operation_helpers

This module contains a helper class to work with google.api_core.operation.Operation object.

Classes

OperationHelper

Helper class to work with operation.Operation objects.

Module Contents

class airflow.providers.google.common.hooks.operation_helpers.OperationHelper[source]

Helper class to work with operation.Operation objects.

static wait_for_operation_result(operation, timeout=DEFAULT, polling=None, retry=None)[source]

Wait for long-lasting operation result to be retrieved.

For advance usage please check the docs on: google.api_core.future.polling.PollingFuture google.api_core.retry.Retry

Parameters:
  • operation (google.api_core.operation.Operation) – The initial operation to get result from.

  • timeout (int | None | google.api_core.gapic_v1.method._MethodDefault) – How long (in seconds) to wait for the operation to complete. If None, wait indefinitely. Overrides polling.timeout if both specified.

  • polling (google.api_core.retry.Retry | None) – How often and for how long to call polling RPC periodically.

  • retry (google.api_core.retry.Retry | None) – How to retry the operation polling if error occurs.

wait_for_operation(operation, timeout=None)[source]

Legacy method name wrapper.

Intended to use with existing hooks/operators, until the proper deprecation and replacement provided.

Was this entry helpful?