fix(1c): retry non-successful report inventory entries

This commit is contained in:
2026-08-15 14:14:18 +03:00
parent b379dd427b
commit e20881f52d
+2 -2
View File
@@ -13,8 +13,8 @@ def main():
listed=call(a.url,'metadata.objects.list',{'base_id':a.base_id,'kind':'Report','limit':500})
for item in listed.get('objects',[]):
name=item.get('name')
if not name or name in state['reports']: continue
try: state['reports'][name]=call(a.url,'report.inspect',{'base_id':a.base_id,'report':name,'timeout_seconds':15})
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':60})
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')
if __name__=='__main__': main()