From a8def94110f98e02b49870b9405d2277585ce507 Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Wed, 4 Oct 2023 18:24:21 +0530 Subject: [PATCH] npp-sorting: fix progress logging --- reports/npp-sorting/npp-sorting.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reports/npp-sorting/npp-sorting.js b/reports/npp-sorting/npp-sorting.js index db827e2..44dec7f 100644 --- a/reports/npp-sorting/npp-sorting.js +++ b/reports/npp-sorting/npp-sorting.js @@ -92,11 +92,13 @@ process.chdir(__dirname); /* GET SHORT DESCRIPTIONS AND PAGE CONTENT */ let pagesWithShortDescs = 0; - let pageBatchesRead = 0; + let pagesRead = 0; for await (let page of bot.readGen(Object.values(revidsTitles), { prop: 'revisions|description', }, 200)) { - log(`[+] Reading contents and descriptions: ${++pageBatchesRead} batches read`); + if (pagesRead % 1000 === 0) { + log(`[+] Reading contents and descriptions: ${++pagesRead} pages read`); + } if (page.missing) { tableInfo[page.title].skip = true; // skip it and return return;