tell asyncio.gather which loop to use
This commit is contained in:
parent
a1438abf66
commit
469c725675
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue