@naturalcycles/nodejs-lib 15.27.2 → 15.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,7 +21,7 @@ export function createReadStreamAsNDJson(inputPath) {
|
|
|
21
21
|
.createReadStream(inputPath, {
|
|
22
22
|
highWaterMark: 64 * 1024, // no observed speedup
|
|
23
23
|
})
|
|
24
|
-
.on('error', err => stream.
|
|
24
|
+
.on('error', err => stream.destroy(err));
|
|
25
25
|
if (inputPath.endsWith('.gz')) {
|
|
26
26
|
stream = stream.pipe(createUnzip({
|
|
27
27
|
chunkSize: 64 * 1024, // speedup from ~3200 to 3800 rps!
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export function createReadStreamAsNDJson<ROW = any>(inputPath: string): Readable
|
|
|
25
25
|
.createReadStream(inputPath, {
|
|
26
26
|
highWaterMark: 64 * 1024, // no observed speedup
|
|
27
27
|
})
|
|
28
|
-
.on('error', err => stream.
|
|
28
|
+
.on('error', err => stream.destroy(err))
|
|
29
29
|
|
|
30
30
|
if (inputPath.endsWith('.gz')) {
|
|
31
31
|
stream = stream.pipe(
|