Skip to content

Commit

Permalink
chore: improve logging in import-subreddit script
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed Jan 10, 2024
1 parent 12f2057 commit 478b924
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/import-subreddit.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const importSubreddit = async (subreddit, { getFullHistory = false } = {}) => {
}

if (!res) {
logger('no response received')
break
}

logger(`found ${res.data.children.length} posts`)

const inserts = []

for (const post of res.data.children) {
Expand Down

0 comments on commit 478b924

Please sign in to comment.