Closed
Description
code here: #24 (comment)
to replace sleep calls in tests.
def wait_for_job(job):
# from https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/bigquery/cloud-client/snippets.py
while True:
job.reload() # Refreshes the state via a GET request.
if job.state == 'DONE':
if job.error_result:
raise RuntimeError(job.errors)
return
logger.info("Waiting for {} to complete".format(job))
time.sleep(1)