Properly close last writer

otherwise Node.js doesn't quit
This commit is contained in:
Starbeamrainbowlabs 2022-07-04 17:04:11 +01:00
parent 588ee87b83
commit 920cc3feaf
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -7,6 +7,7 @@ import RecordBuilder from '../record/RecordBuilder.mjs';
import RecordsWriter from '../record/RecordsWriter.mjs';
import pretty_ms from 'pretty-ms';
import terrain50_analyse_frequencies from 'terrain50/src/static/Terrain50AnalyseFrequencies.mjs';
import { end_safe } from './StreamHelpers.mjs';
class RecordWrangler {
#builder = new RecordBuilder();
@ -58,7 +59,9 @@ class RecordWrangler {
time_display = time_now;
}
}
await writer.close();
console.log(`\nComplete! ${i_file}/${i} files/records_total written in ${pretty_ms(new Date() - time_start)}`);
}
make_example(sample_radar, sample_water) {