Skip to content

Commit

Permalink
chore: update epoch detection and snapshot process unhealthy interval…
Browse files Browse the repository at this point in the history
… to 30 epochs
  • Loading branch information
xadahiya committed Nov 25, 2023
1 parent 2df1b9a commit d8b7be3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions snapshotter/processor_distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()

Expand Down

0 comments on commit d8b7be3

Please sign in to comment.