From 2398aab82b1b712566c3a9ed8c122034b2bbafec Mon Sep 17 00:00:00 2001 From: cutestnekoaqua Date: Wed, 29 Mar 2023 21:16:45 +0200 Subject: [PATCH] add info --- packages/backend/src/queue/processors/db/import-posts.ts | 5 +++-- 1 file changed, 3 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 19576a97f2..f1e1a232fc 100644 --- a/packages/backend/src/queue/processors/db/import-posts.ts +++ b/packages/backend/src/queue/processors/db/import-posts.ts @@ -39,6 +39,7 @@ export async function importPosts( try { const parsed = JSON.parse(json); if (parsed instanceof Array) { + logger.info("Parsing key style posts"); for (const post of JSON.parse(json)) { try { linenum++; @@ -78,7 +79,8 @@ export async function importPosts( logger.warn(`Error in line:${linenum} ${e}`); } } - } else { + } else if (parsed instanceof Object) { + logger.info("Parsing animal style posts"); for (const post of parsed.orderedItems) { try { linenum++; @@ -112,7 +114,6 @@ export async function importPosts( } catch (e) { logger.warn(`Error in line:${linenum} ${e}`); } - } } } catch (e) {