Skip to content

Commit

Permalink
reduced logging because it lags github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
au5ton committed Feb 25, 2023
1 parent 9930cfd commit e396bd2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mock-database/src/createMockDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ console.log('CSV records have been parsed and shuffled');

await reset()


const prepatch = files.filter(e => e.split('/').reverse()[0].startsWith(`patch-0`))
console.log(`Pre-processing patch-0 patchfiles (${prepatch.length} entries)...`)
// Do `patch-0` first
for (let file of files.filter(e => e.split('/').reverse()[0].startsWith(`patch-0`))) {
for (let file of prepatch) {
await processPatchfile(file)
}
console.log(`Pre-processed patch-0 patchfiles (${prepatch.length} processed)`)

console.log(`Starting record processing (${records.length} entries)...`)
console.time('Records processed in')
// Do `records.csv`
for (let i = 0; i < records.length; i++) {
await whenUploadQueueAdded(records[i]);
console.log(`Processed record: ${i+1} of ${records.length} (${((i+1)/records.length*100).toFixed(1)}%)`)
//console.log(`Processed record: ${i+1} of ${records.length} (${((i+1)/records.length*100).toFixed(1)}%)`)
}
console.timeEnd('Records processed in')
console.log(`Finished processing records (${records.length} processed)`)

// Do remaining patchfiles
Expand Down

0 comments on commit e396bd2

Please sign in to comment.