【发布时间】:2019-04-18 10:45:00
【问题描述】:
我正在调用一个 Google Cloud 函数,该函数返回一个实现 google.longrunning.Operations 接口的 Operation 对象。我想从另一个仅接收操作名称的 Python 进程轮询此操作(无法访问操作对象本身)。所以我需要类似的东西:
operation = getOperation(operationName)
isdone = operation.done()
AFAIK,您无法执行上述第一步。我这里没找到:https://google-cloud-python.readthedocs.io/en/stable/core/operation.html
我想做有关google.longrunning 接口 (https://cloud.google.com/speech-to-text/docs/reference/rpc/google.longrunning#google.longrunning.Operations.GetOperation) 的文档中的说明:
rpc GetOperation(GetOperationRequest) returns (Operation)
GetOperationRequest 只需要操作名称。有没有办法使用google-cloud-python 库中的函数“重新创建”操作?
【问题讨论】:
标签: python google-api google-cloud-platform google-cloud-functions