exception handling during sync
Compare changes
Files
2- Marcin authored
+ 62
− 35
@@ -35,22 +35,31 @@ from hive.indexer.mock_vops_provider import MockVopsProvider
@@ -35,22 +35,31 @@ from hive.indexer.mock_vops_provider import MockVopsProvider
@@ -62,7 +71,7 @@ def prepare_vops(vops_by_block):
@@ -62,7 +71,7 @@ def prepare_vops(vops_by_block):
@@ -75,7 +84,7 @@ def _block_provider(node, queue, lbound, ubound, chunk_size):
@@ -75,7 +84,7 @@ def _block_provider(node, queue, lbound, ubound, chunk_size):
@@ -86,7 +95,8 @@ def _block_provider(node, queue, lbound, ubound, chunk_size):
@@ -86,7 +95,8 @@ def _block_provider(node, queue, lbound, ubound, chunk_size):
@@ -95,7 +105,7 @@ def _vops_provider(conf, node, queue, lbound, ubound, chunk_size):
@@ -95,7 +105,7 @@ def _vops_provider(conf, node, queue, lbound, ubound, chunk_size):
@@ -108,9 +118,11 @@ def _vops_provider(conf, node, queue, lbound, ubound, chunk_size):
@@ -108,9 +118,11 @@ def _vops_provider(conf, node, queue, lbound, ubound, chunk_size):
@@ -125,26 +137,39 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
@@ -125,26 +137,39 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
@@ -152,7 +177,7 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
@@ -152,7 +177,7 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
@@ -185,22 +210,16 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
@@ -185,22 +210,16 @@ def _block_consumer(node, blocksQueue, vopsQueue, is_initial_sync, lbound, uboun
log.info(f"Elapsed time: {stop :.4f}s. Calculated elapsed time: {ttm :.4f}s. Difference: {stop - ttm :.4f}s")
log.info(f"Highest block processing rate: {rate['max'] :.4f} bps. From: {rate['max_from']} To: {rate['max_to']}")
log.info(f"Lowest block processing rate: {rate['min'] :.4f} bps. From: {rate['min_from']} To: {rate['min_to']}")
@@ -208,21 +227,27 @@ def _node_data_provider(self, is_initial_sync, lbound, ubound, chunk_size):
@@ -208,21 +227,27 @@ def _node_data_provider(self, is_initial_sync, lbound, ubound, chunk_size):
blockConsumerFuture = pool.submit(_block_consumer, self._steem, blocksQueue, vopsQueue, is_initial_sync, lbound, ubound, chunk_size)
@@ -288,7 +313,7 @@ class Sync:
@@ -288,7 +313,7 @@ class Sync:
@@ -311,6 +336,8 @@ class Sync:
@@ -311,6 +336,8 @@ class Sync:
@@ -325,7 +352,7 @@ class Sync:
@@ -325,7 +352,7 @@ class Sync: