refactor(UptimeMonitorPage): update background check logic to utilize cached data on page load
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 3m10s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 3m10s
This commit is contained in:
@@ -187,10 +187,9 @@ export default function UptimeMonitorPage() {
|
||||
setChecking(false);
|
||||
}, [jumphosts]);
|
||||
|
||||
// Автопроверка по интервалу в фоне (параллельно с другими проверками)
|
||||
// Автопроверка по интервалу в фоне (при открытии страницы данные берём из кеша, без немедленного запуска проверки)
|
||||
useEffect(() => {
|
||||
if (jumphosts.length === 0) return;
|
||||
runChecks();
|
||||
intervalRef.current = setInterval(runChecks, checkIntervalMs);
|
||||
return () => {
|
||||
if (intervalRef.current) clearInterval(intervalRef.current);
|
||||
|
||||
Reference in New Issue
Block a user