From d8b7be32ad329e8dcf0a7e5c1b27862894bc990a Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Sat, 25 Nov 2023 14:44:39 +0530 Subject: [PATCH] chore: update epoch detection and snapshot process unhealthy interval to 30 epochs --- snapshotter/processor_distributor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snapshotter/processor_distributor.py b/snapshotter/processor_distributor.py index 7fd19524..b81ff989 100644 --- a/snapshotter/processor_distributor.py +++ b/snapshotter/processor_distributor.py @@ -436,11 +436,11 @@ async def _epoch_processing_health_check(self, current_epoch_id): await self._send_proc_hub_respawn() # if time difference between last epoch detected and last snapshot processed - # is more than 10 epochs, report unhealthy and send respawn command + # is more than 30 epochs, report unhealthy and send respawn command if last_epoch_detected and last_snapshot_processed and \ - last_epoch_detected - last_snapshot_processed > 10 * self._source_chain_block_time * self._epoch_size: + last_epoch_detected - last_snapshot_processed > 30 * self._source_chain_block_time * self._epoch_size: self._logger.debug( - 'Sending unhealthy epoch report to reporting service due to no snapshot processing for ~10 epochs', + 'Sending unhealthy epoch report to reporting service due to no snapshot processing for ~30 epochs', ) await send_failure_notifications_async( client=self._client, @@ -459,7 +459,7 @@ async def _epoch_processing_health_check(self, current_epoch_id): ), ) self._logger.info( - 'Sending respawn command for all process hub core children because no snapshot processing was done for ~10 epochs', + 'Sending respawn command for all process hub core children because no snapshot processing was done for ~30 epochs', ) await self._send_proc_hub_respawn()