yangdx commited on
Commit
c3c456b
·
1 Parent(s): ed4a52b

Optimize health check

Browse files
lightrag_webui/src/App.tsx CHANGED
@@ -76,7 +76,7 @@ function App() {
76
  if (!healthCheckInitializedRef.current) {
77
  healthCheckInitializedRef.current = true;
78
  // Immediate health check on first load
79
- // performHealthCheck();
80
  }
81
 
82
  // Set interval for periodic execution
 
76
  if (!healthCheckInitializedRef.current) {
77
  healthCheckInitializedRef.current = true;
78
  // Immediate health check on first load
79
+ performHealthCheck();
80
  }
81
 
82
  // Set interval for periodic execution
lightrag_webui/src/features/DocumentManager.tsx CHANGED
@@ -369,15 +369,6 @@ export default function DocumentManager() {
369
  failed: docs?.statuses?.failed?.length || 0
370
  }
371
 
372
- // Check if any status count has changed
373
- const hasStatusCountChange = (Object.keys(newStatusCounts) as Array<keyof typeof newStatusCounts>).some(
374
- status => newStatusCounts[status] !== prevStatusCounts.current[status]
375
- )
376
-
377
- // Trigger health check if changes detected and component is still mounted
378
- if (hasStatusCountChange && isMountedRef.current) {
379
- useBackendState.getState().check()
380
- }
381
 
382
  // Only update state if component is still mounted
383
  if (isMountedRef.current) {
 
369
  failed: docs?.statuses?.failed?.length || 0
370
  }
371
 
 
 
 
 
 
 
 
 
 
372
 
373
  // Only update state if component is still mounted
374
  if (isMountedRef.current) {