dht_crawler: gather both loops, avoid task exceptions being hidden

This commit is contained in:
Victor Shyba 2022-07-28 21:40:01 -03:00 committed by Victor Shyba
parent f077e56cec
commit c38573d5de

View file

@ -488,8 +488,7 @@ async def test():
probes.append(asyncio.create_task(crawler.crawl_routing_table(host, port)))
await asyncio.gather(*probes)
await crawler.flush_to_db()
probe_task = asyncio.ensure_future(crawler.probe_files())
await crawler.process()
await asyncio.gather(crawler.process(), crawler.probe_files())
if __name__ == '__main__':
asyncio.run(test())