MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / CheckAssetStatus

Function CheckAssetStatus

samples/maps_engine/maps_engine.py:139–149  ·  view source on GitHub ↗
(service, asset_type, asset_id)

Source from the content-addressed store, hash-verified

137
138
139def CheckAssetStatus(service, asset_type, asset_id):
140 endpoint = getattr(service, asset_type)
141 response = endpoint().get(id=asset_id).execute()
142 status = response["processingStatus"]
143 logging.info("Asset Status: %s", status)
144 if status in SUCCESSFUL_STATUS:
145 logging.info("asset successfully processed; the id is %s", asset_id)
146 else:
147 logging.info("Asset %s; will check again in 5 seconds", status)
148 time.sleep(5)
149 CheckAssetStatus(service, asset_type, asset_id)
150
151
152def main(argv):

Callers 1

UploadShapefileFunction · 0.85

Calls 3

infoMethod · 0.80
executeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…