aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2019-07-08 14:50:11 +0100
committerGravatar jesopo2019-07-08 14:50:11 +0100
commitc19c6c0e14078c4b759b52c94b40efdd0a974198 (patch)
treed546d8956907c2817b542d5d343eb466d68929f4 /src/utils
parenttell asyncio.gather which loop to use (diff)
signature
asyncio.gather -> asyncio.wait (with timeout)
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index e6ed9b24..6086fb37 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, loop=loop)
+ task = asyncio.wait(awaits, loop=loop, timeout=5)
loop.run_until_complete(task)
loop.close()