add blue sky fetcher

This commit is contained in:
Travis Shears 2024-06-24 18:53:06 +02:00
parent e8234e41e8
commit ef8144ba26
5 changed files with 178 additions and 7 deletions

View file

@ -96,7 +96,7 @@ const saveImages = async (post: PixelFedPost, postId: string) => {
exports.run = async (event: any, context: any) => {
withRequest(event, context);
const lastSavedPostId = await pb.getLatestPostId("pixelfed");
const lastSavedPostId = await pb.getLatestPostRemoteIDBySource("pixelfed");
const posts = await getPostUntilId({ lastSavedId: lastSavedPostId });
for (const post of posts) {
logger.info({ post }, "saving post");