feat: process blog posts sequentially with rate limiting

main
brobert (aider) 3 months ago
parent 80b232f3a4
commit 40d4565ca3

@ -90,10 +90,11 @@ async function fetchBlogPosts(): Promise<BlogPost[]> {
}
};
// Process posts with limited concurrency
const results = await Promise.allSettled(
postUrls.slice(0, 10).map(processPost) // Limit to 10 posts for initial testing
);
// Process posts sequentially with delay
const results = [];
for (const url of postUrls.slice(0, 10)) { // Limit to 10 posts for initial testing
results.push(await processPost(url));
}
const posts: BlogPost[] = results
.filter((result): result is PromiseFulfilledResult<BlogPost> =>

Loading…
Cancel
Save