Skip to content

Commit

Permalink
Merge pull request #304 from guardian/reduce-expensive-polling
Browse files Browse the repository at this point in the history
💸 decrease polling frequency of `getGroupPinboardIds` and `getItemCounts` from 5s to 15s
  • Loading branch information
twrichards authored Apr 17, 2024
2 parents 8c4e6fb + b5a49aa commit 7440e83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

# Setup AWS credentials to enable uploading to S3 for Riff-Raff.
# See https://github.com/aws-actions/configure-aws-credentials
- uses: aws-actions/configure-aws-credentials@v1-node16
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
Expand Down
2 changes: 1 addition & 1 deletion client/src/inline/inlineMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const InlineMode = ({
)
),
});
startPolling(5000);
startPolling(15000);
}
}, [workflowTitleElementLookup]);

Expand Down
2 changes: 1 addition & 1 deletion client/src/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7440e83

Please sign in to comment.