diff --git a/src/subscribers/consoleSubscriber.js b/src/subscribers/consoleSubscriber.js index 76a281b..b534337 100644 --- a/src/subscribers/consoleSubscriber.js +++ b/src/subscribers/consoleSubscriber.js @@ -78,6 +78,16 @@ emitter.on('parse.error', ({ filepath, columns, error }) => { // emitter.on('parse.data', ({ filepath, columns, data, index }) => { // log('parse.data', `Parsed ${filepath} with columns at index ${index}`); // }); +let processed = 0; +let limit = 10000; +emitter.on('parse.data', ({ filepath, columns, data, index }) => { + processed++; + + if ( processed == limit ) { + log('parse.data', `[${index.toLocaleString()} lignes] traités`); + processed = 0; + } +}); // Create a new listener for the deleteOldFiles.start event