From cb5ed8b703ed97f8140c501b212f8879ee82465e Mon Sep 17 00:00:00 2001 From: Tom Richards Date: Tue, 16 Apr 2024 21:24:01 +0100 Subject: [PATCH] decrease the polling frequency of `getGroupPinboardIds` and `getItemCounts` from 5s to 15s as they're quite expensive - this is a temporary measure that I'd like to replace with GraphQL subscriptions somehow, so they're realtime like everything else --- client/src/inline/inlineMode.tsx | 2 +- client/src/panel.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/inline/inlineMode.tsx b/client/src/inline/inlineMode.tsx index 09bbd591..cabeaa54 100644 --- a/client/src/inline/inlineMode.tsx +++ b/client/src/inline/inlineMode.tsx @@ -80,7 +80,7 @@ export const InlineMode = ({ ) ), }); - startPolling(5000); + startPolling(15000); } }, [workflowTitleElementLookup]); diff --git a/client/src/panel.tsx b/client/src/panel.tsx index 2dae1749..ec3c30cd 100644 --- a/client/src/panel.tsx +++ b/client/src/panel.tsx @@ -105,7 +105,7 @@ export const Panel = ({ Math.abs(boundedPositionTranslation.y) > window.innerHeight / 2; const groupPinboardIdsQuery = useQuery(gqlGetGroupPinboardIds, { - pollInterval: 5000, // always poll this one, to ensure we get unread flags even when pinboard is not expanded + pollInterval: 15000, // always poll this one, to ensure we get unread flags even when pinboard is not expanded }); const groupPinboardIdsWithClaimCounts: PinboardIdWithClaimCounts[] = useMemo( @@ -173,7 +173,7 @@ export const Panel = ({ useEffect(() => { if (isExpanded) { pinboardDataQuery.refetch(); - pinboardDataQuery.startPolling(5000); + pinboardDataQuery.startPolling(15000); } else { pinboardDataQuery.stopPolling(); }