dht_crawler: gather both loops, avoid task exceptions being hidden
This commit is contained in:
parent
f077e56cec
commit
c38573d5de
1 changed files with 1 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue