airflow.providers.google.common.hooks.operation_helpers¶
此模块包含一个辅助类,用于处理 google.api_core.operation.Operation 对象。
类¶
辅助类,用于处理 operation.Operation 对象。 |
模块内容¶
- class airflow.providers.google.common.hooks.operation_helpers.OperationHelper[source]¶
辅助类,用于处理 operation.Operation 对象。
- static wait_for_operation_result(operation, timeout=None, polling=None, retry=None)[source]¶
等待检索长时间运行的操作结果。
有关高级用法,请查阅以下文档:
google.api_core.future.polling.PollingFuture
google.api_core.retry.Retry
- 参数:
operation (google.api_core.operation.Operation) – 用于获取结果的初始操作。
timeout (int | None) – 等待操作完成的时间(以秒为单位)。如果为 None,则无限期等待。如果同时指定了 timeout 和 polling.timeout,此参数会覆盖 polling.timeout。
polling (google.api_core.retry.Retry | None) – 定期调用轮询 RPC 的频率和持续时间。
retry (google.api_core.retry.Retry | None) – 如果发生错误,如何重试操作轮询。