From e6f24496a87674444ddf2318c9d7d65776daf052 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Sun, 24 Nov 2024 02:42:23 +0300 Subject: [PATCH] update --- checker.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/checker.py b/checker.py index 1cdafd8..74a135e 100644 --- a/checker.py +++ b/checker.py @@ -116,17 +116,21 @@ def check_logs(logger): if "Error from tendermint rpc" in line: error_count += 1 logger.error(f"RPC error: {line}") + if "Is your verifier's account funded" in line: + logger.error(f"Verifier account not funded: {line}") + error_count += 1 if "Synced with network" in line: sync_count += 1 logger.info(f"Synced with network: {line}") + challenge_match = re.search(r'made (\d+) secret challenges', line) if challenge_match: total_challenges += int(challenge_match.group(1)) logger.info(f"Made {total_challenges} secret challenges: {line}") result = { - "rpc_errors": error_count, + "errors": error_count, "sync_events": sync_count, "total_challenges": total_challenges } @@ -156,7 +160,7 @@ if __name__ == "__main__": try: result = check_logs(logger) - data = f"{result['sync_events']}/{result['total_challenges']}/{result['rpc_errors']}" # Syncs/Challenges/RPC errors + data = f"{result['sync_events']}/{result['total_challenges']}/{result['errors']}" # Syncs/Challenges/Errors grist_callback({ "Health": data }) print(result) except Exception as e: