From b01ec6117fd87c4698bef721e72156005b465e0c Mon Sep 17 00:00:00 2001 From: 0age <37939117+0age@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:00:11 -0800 Subject: [PATCH] minor health check tweaks --- frontend/src/components/HealthCheck.tsx | 68 +++++++++++++++++-------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/HealthCheck.tsx b/frontend/src/components/HealthCheck.tsx index 12a9fbe..b8b48bd 100644 --- a/frontend/src/components/HealthCheck.tsx +++ b/frontend/src/components/HealthCheck.tsx @@ -21,12 +21,16 @@ const HealthCheck: React.FC = () => { setError(null); } catch (error) { console.error('Error fetching health status:', error); - setError(error instanceof Error ? error.message : 'Failed to fetch health status'); + setError( + error instanceof Error + ? error.message + : 'Failed to fetch health status' + ); } }; - // Fetch health data every 2 seconds - const intervalId = setInterval(fetchHealthData, 2000); + // Fetch health data every second + const intervalId = setInterval(fetchHealthData, 1000); // Cleanup interval on component unmount return () => clearInterval(intervalId); @@ -37,8 +41,16 @@ const HealthCheck: React.FC = () => {