Skip to content

Commit

Permalink
npp-sorting: fix progress logging
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Oct 4, 2023
1 parent 7a11feb commit a8def94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions reports/npp-sorting/npp-sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a8def94

Please sign in to comment.