From 26e6837a4804d4c0b81cfcdab1c71362fc908f73 Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Wed, 11 Dec 2024 15:19:14 +0800 Subject: [PATCH] only stop polling when all resources are in idle status --- .../features/projects/status/ProjectResources.svelte | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web-admin/src/features/projects/status/ProjectResources.svelte b/web-admin/src/features/projects/status/ProjectResources.svelte index 4d4f010b825..a0b5c7008f5 100644 --- a/web-admin/src/features/projects/status/ProjectResources.svelte +++ b/web-admin/src/features/projects/status/ProjectResources.svelte @@ -66,9 +66,17 @@ pollInterval = setInterval(() => { refetchAttempts++; - // Check for reconcile error during polling if (individualRefresh && hasReconcileError) { - stopPolling(); + // Check if any resources are still reconciling + const stillReconciling = $allResources.data.some( + (resource) => + resource.meta.reconcileStatus !== + V1ReconcileStatus.RECONCILE_STATUS_IDLE, + ); + + if (!stillReconciling) { + stopPolling(); + } // Refetch resources for latest reconcile status void $allResources.refetch();