|
|
@ -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
|
|
|
|