Skip to content

Commit

Permalink
revert to 9db4f12
Browse files Browse the repository at this point in the history
  • Loading branch information
édouard wautier authored and édouard wautier committed Oct 9, 2023
1 parent 57cbd59 commit 6a0e260
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions connectors/src/connectors/notion/lib/notion_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,7 @@ export async function* iteratePaginatedAPIWithRetries<
retry: { retries: number; backoffFactor: number } = {
retries: 5,
backoffFactor: 2,
},
sleepMs = 1000
}
): AsyncIterableIterator<Item> {
let nextCursor: string | null | undefined = firstPageArgs.start_cursor;
let resultPageIdx = 0;
Expand Down Expand Up @@ -1322,9 +1321,5 @@ export async function* iteratePaginatedAPIWithRetries<
yield* response.results;
nextCursor = response.next_cursor;
resultPageIdx += 1;

if (nextCursor && sleepMs) {
await new Promise((resolve) => setTimeout(resolve, sleepMs));
}
} while (nextCursor);
}

0 comments on commit 6a0e260

Please sign in to comment.