Basic polling helper function for long running operations/jobs
Several libraries with long running operation are lacking basic helper functions for polling
Considering that implementing exponential backoff properly is a 15 line affair which clutters up code it might be good to have a util function that properly implements exponential backoff and then allow things to call it, like in bigquery.job.Jobs
def wait(self):
utils.exponential_backoff(self.begin, self.reload, self.status)
@tseaver @jonparrott The updated package with an optional [grpc] dependency is available at https://testpypi.python.org/pypi/googleapis-common-protos (version 1.3.2).
pip install googleapis-common-protos
-or-
pip install googleapis-common-protos[grpc]
PLMK if this looks good, so I can publish it to the regular pypi.
FYI, the test package has long since been published on regular PyPI. We are currently at 1.3.4.
This exists in gax now, I'm gonna close this.
Apologies for resurrecting this thread.
I am trying to implement longrunning operation interface for one of my APIs. I tried installing apis-common-protos using googleapis-common-protos and googleapis-common-protos[grpc]. The operations_grpc_pb2.py from installed package does contain client stub, but no servicer interface is available.
Am I missing anything here or are there any specific instructions to generate the same?
I am bit stuck on this. @bjwatson @theacodes any pointers would be really appreciated.