From b04d62c41658c52edbe9f90549defb6b64295ef5 Mon Sep 17 00:00:00 2001 From: Alec Blance <17378596+AlecBlance@users.noreply.github.com> Date: Tue, 28 Nov 2023 18:35:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=92=AB=20application=20error=20-?= =?UTF-8?q?=20due=20to=20the=20long=20response=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/fetch-projects.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/fetch-projects.ts b/src/actions/fetch-projects.ts index 5412313..01659ba 100644 --- a/src/actions/fetch-projects.ts +++ b/src/actions/fetch-projects.ts @@ -13,6 +13,7 @@ const fetchProjects = async ( let projects: Project[] = []; let previousProjectsLength = 0; let pages = 0; + let startTime = Date.now(); const getProjects = async () => { const variables: Variables = { @@ -83,7 +84,7 @@ const fetchProjects = async ( hasNextPage = false; break; } - } while (hasNextPage && projects.length < 20); + } while (hasNextPage && Date.now() - startTime < 9000); return { hasNextPage, after,