mirror of https://github.com/skygpu/skynet.git
Go back to using gather on tg ipfs result getting
parent
359e491d1f
commit
ee1fdcc557
|
@ -266,14 +266,10 @@ class SkynetTelegramFrontend:
|
||||||
logging.warning(f'couldn\'t get ipfs binary data at {link}!')
|
logging.warning(f'couldn\'t get ipfs binary data at {link}!')
|
||||||
|
|
||||||
tasks = [
|
tasks = [
|
||||||
asyncio.create_task(get_and_set_results(ipfs_link)),
|
get_and_set_results(ipfs_link),
|
||||||
asyncio.create_task(get_and_set_results(ipfs_link_legacy))
|
get_and_set_results(ipfs_link_legacy)
|
||||||
]
|
]
|
||||||
done, pending = await asyncio.wait(
|
await asyncio.gather(*tasks)
|
||||||
tasks, return_when=asyncio.FIRST_COMPLETED)
|
|
||||||
|
|
||||||
for task in pending:
|
|
||||||
task.cancel()
|
|
||||||
|
|
||||||
png_img = None
|
png_img = None
|
||||||
if ipfs_link_legacy in results:
|
if ipfs_link_legacy in results:
|
||||||
|
|
Loading…
Reference in New Issue