From 2f15ed86435d76fbf0ce510e581ad0e6c8929b27 Mon Sep 17 00:00:00 2001 From: vimystic <122659254+vimystic@users.noreply.github.com> Date: Tue, 2 Apr 2024 21:29:09 -0600 Subject: [PATCH] Update --- internal/fullnode/stuck_detection.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/internal/fullnode/stuck_detection.go b/internal/fullnode/stuck_detection.go index 25d5ff8f..be630b30 100644 --- a/internal/fullnode/stuck_detection.go +++ b/internal/fullnode/stuck_detection.go @@ -47,9 +47,9 @@ func (d StuckPodDetection) StuckPods(ctx context.Context, crd *cosmosv1.CosmosFu panic(err.Error()) } - testString := getPodLogsLastLine(clientset, pod) - fmt.Println(testString) - podIsStuck := isPodStuck(testString) + receivedString := getPodLogsLastLine(clientset, pod) + fmt.Println(receivedString) + podIsStuck := isPodStuck(receivedString) //MORE TODO HERE if podIsStuck { @@ -61,9 +61,8 @@ func (d StuckPodDetection) StuckPods(ctx context.Context, crd *cosmosv1.CosmosFu return []*corev1.Pod{} } - -func isPodStuck(testString string) bool { - return strings.Contains(inputString, "SignerListener: Connected") +func isPodStuck(receivedString string) bool { + return strings.Contains(receivedString, "SignerListener: Connected") } func getPodLogsLastLine(clientset *kubernetes.Clientset, pod *corev1.Pod) string { @@ -90,8 +89,6 @@ func getPodLogsLastLine(clientset *kubernetes.Clientset, pod *corev1.Pod) string return "" } -} - func removeElement(slice []*corev1.Pod, index int) []*corev1.Pod { return append(slice[:index], slice[index+1:]...) -} \ No newline at end of file +}