From 220b022461a054ffbb590b4de82ffd2070cb4a65 Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 29 Mar 2023 19:23:37 +0200 Subject: [PATCH] note import debug logs --- packages/backend/src/queue/processors/db/import-posts.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/queue/processors/db/import-posts.ts b/packages/backend/src/queue/processors/db/import-posts.ts index a28350c757..48ef6371e3 100644 --- a/packages/backend/src/queue/processors/db/import-posts.ts +++ b/packages/backend/src/queue/processors/db/import-posts.ts @@ -15,7 +15,7 @@ export async function importPosts( job: Bull.Job, done: any, ): Promise { - logger.info(`Importing following of ${job.data.user.id} ...`); + logger.info(`Importing posts of ${job.data.user.id} ...`); const user = await Users.findOneBy({ id: job.data.user.id }); if (user == null) { @@ -39,12 +39,17 @@ export async function importPosts( for (const post of JSON.parse(csv)) { try { if (post.replyId != null) { + logger.info(`Is reply, skip [${linenum}] ...`); continue; } if (post.renoteId != null) { + logger.info(`Is boost, skip [${linenum}] ...`); + continue; + } + if (post.visibility !== "public") { + logger.info(`Is non-public, skip [${linenum}] ...`); continue; } - if (post.visibility !== "public") continue; const { text, cw, localOnly, createdAt } = Post.parse(post); logger.info(`Posting[${linenum}] ...`);