fix(1c): retry non-successful report inventory entries
This commit is contained in:
@@ -13,8 +13,8 @@ def main():
|
|||||||
listed=call(a.url,'metadata.objects.list',{'base_id':a.base_id,'kind':'Report','limit':500})
|
listed=call(a.url,'metadata.objects.list',{'base_id':a.base_id,'kind':'Report','limit':500})
|
||||||
for item in listed.get('objects',[]):
|
for item in listed.get('objects',[]):
|
||||||
name=item.get('name')
|
name=item.get('name')
|
||||||
if not name or name in state['reports']: continue
|
if not name or state['reports'].get(name, {}).get('status') == 'ok': continue
|
||||||
try: state['reports'][name]=call(a.url,'report.inspect',{'base_id':a.base_id,'report':name,'timeout_seconds':15})
|
try: state['reports'][name]=call(a.url,'report.inspect',{'base_id':a.base_id,'report':name,'timeout_seconds':60})
|
||||||
except Exception as exc: state['reports'][name]={'status':'transport_error','diagnostics':str(exc)}
|
except Exception as exc: state['reports'][name]={'status':'transport_error','diagnostics':str(exc)}
|
||||||
a.output.parent.mkdir(parents=True,exist_ok=True); a.output.write_text(json.dumps(state,ensure_ascii=False,indent=2),encoding='utf-8')
|
a.output.parent.mkdir(parents=True,exist_ok=True); a.output.write_text(json.dumps(state,ensure_ascii=False,indent=2),encoding='utf-8')
|
||||||
if __name__=='__main__': main()
|
if __name__=='__main__': main()
|
||||||
|
|||||||
Reference in New Issue
Block a user