From ee1fdcc5578ccb6e9037e6b8647a6497e0ef7c79 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sun, 8 Oct 2023 16:36:29 -0300 Subject: [PATCH] Go back to using gather on tg ipfs result getting --- skynet/frontend/telegram/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/skynet/frontend/telegram/__init__.py b/skynet/frontend/telegram/__init__.py index 550633c..0afd47d 100644 --- a/skynet/frontend/telegram/__init__.py +++ b/skynet/frontend/telegram/__init__.py @@ -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: