diff options
| author | 2019-07-08 14:50:11 +0100 | |
|---|---|---|
| committer | 2019-07-08 14:50:11 +0100 | |
| commit | c19c6c0e14078c4b759b52c94b40efdd0a974198 (patch) | |
| tree | d546d8956907c2817b542d5d343eb466d68929f4 /src/utils | |
| parent | tell 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.py | 2 |
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() |
