From 469c7256750ce4d508737fcb1031895b2edf60e5 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 8 Jul 2019 14:41:12 +0100 Subject: [PATCH] tell asyncio.gather which loop to use --- src/utils/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/http.py b/src/utils/http.py index 88edeb46..e6ed9b24 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -131,7 +131,7 @@ def request_many(urls: typing.List[str]) -> typing.Dict[str, Response]: awaits = [] for url in urls: awaits.append(_request(url)) - task = asyncio.gather(*awaits, return_exceptions=True) + task = asyncio.gather(*awaits, return_exceptions=True, loop=loop) loop.run_until_complete(task) loop.close()