Go back to using gather on tg ipfs result getting

pull/26/head
Guillermo Rodriguez 2023-10-08 16:36:29 -03:00
parent 359e491d1f
commit ee1fdcc557
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 3 additions and 7 deletions

View File

@ -266,14 +266,10 @@ class SkynetTelegramFrontend:
logging.warning(f'couldn\'t get ipfs binary data at {link}!')
tasks = [
asyncio.create_task(get_and_set_results(ipfs_link)),
asyncio.create_task(get_and_set_results(ipfs_link_legacy))
get_and_set_results(ipfs_link),
get_and_set_results(ipfs_link_legacy)
]
done, pending = await asyncio.wait(
tasks, return_when=asyncio.FIRST_COMPLETED)
for task in pending:
task.cancel()
await asyncio.gather(*tasks)
png_img = None
if ipfs_link_legacy in results: