(service, asset_type, asset_id)
| 137 | |
| 138 | |
| 139 | def 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 | |
| 152 | def main(argv): |
no test coverage detected
searching dependent graphs…