Skip to content
Snippets Groups Projects
Commit 5a4b266b authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] increase delay between network crawling to 1 mn

parent 9dba9504
No related branches found
No related tags found
No related merge requests found
...@@ -165,9 +165,10 @@ class NetworkService(QObject): ...@@ -165,9 +165,10 @@ class NetworkService(QObject):
self._must_crawl = True self._must_crawl = True
first_loop = True first_loop = True
asyncio.ensure_future(self.discovery_loop()) asyncio.ensure_future(self.discovery_loop())
self.refresh_once() await self.refresh_once()
while self.continue_crawling(): while self.continue_crawling():
if not first_loop: if not first_loop:
self._logger.debug("Start of network crawling...")
for node in self._processor.nodes(self.currency): for node in self._processor.nodes(self.currency):
if ( if (
node.state > Node.FAILURE_THRESHOLD node.state > Node.FAILURE_THRESHOLD
...@@ -193,9 +194,9 @@ class NetworkService(QObject): ...@@ -193,9 +194,9 @@ class NetworkService(QObject):
self.run_ws2p_check() self.run_ws2p_check()
first_loop = False first_loop = False
await asyncio.sleep(15) await asyncio.sleep(60)
self._logger.debug("End of network discovery") self._logger.debug("End of discover_network()")
async def discovery_loop(self): async def discovery_loop(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment