Skip to content

Commit

Permalink
Merge pull request #2 from AlecBlance/refactor-lower-threshold
Browse files Browse the repository at this point in the history
fix: 💫 application error
  • Loading branch information
AlecBlance authored Nov 28, 2023
2 parents 5b6e609 + b04d62c commit 7bbd459
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/fetch-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -83,7 +84,7 @@ const fetchProjects = async (
hasNextPage = false;
break;
}
} while (hasNextPage && projects.length < 20);
} while (hasNextPage && Date.now() - startTime < 9000);
return {
hasNextPage,
after,
Expand Down

0 comments on commit 7bbd459

Please sign in to comment.