fix hanging if no available mirrors
This commit is contained in:
doms9 2025-12-12 10:46:56 -05:00
parent 3a1d2742f1
commit 00000d9233
8 changed files with 24 additions and 16 deletions

View file

@ -67,12 +67,13 @@ async def refresh_api_cache(
results = await asyncio.gather(*tasks)
data = list(chain(*results))
if not (data := list(chain(*results))):
return []
for ev in data:
ev["ts"] = ev.pop("timestamp")
data[-1]["timestamp"] = Time.now().timestamp()
data[-1]["timestamp"] = Time.now().timestamp()
return data