From d5de60f78114e17ab0c7fc4bf51525c6d5dc454c Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Fri, 16 May 2025 14:23:46 -0700 Subject: [PATCH] fix(issues): Refetch status every 5 minutes, focus --- static/app/utils/useServiceIncidents.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/app/utils/useServiceIncidents.tsx b/static/app/utils/useServiceIncidents.tsx index cd595be9debf94..b94574812a81dc 100644 --- a/static/app/utils/useServiceIncidents.tsx +++ b/static/app/utils/useServiceIncidents.tsx @@ -73,7 +73,10 @@ export function useServiceIncidents({ return filteredIncidents; }, - // Refetch every 10 minutes - refetchInterval: 1000 * 60 * 10, + // 5 minutes + staleTime: 1000 * 60 * 5, + // Refetch every 5 minutes and when window is refocused + refetchInterval: 1000 * 60 * 5, + refetchOnWindowFocus: true, }); }