@forzalabs/remora 1.0.15 → 1.0.16
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.
|
@@ -149,10 +149,12 @@ class ConsumerExecutorClass {
|
|
|
149
149
|
writer.end();
|
|
150
150
|
});
|
|
151
151
|
// Ensure the reader is fully closed before renaming
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
if (!reader.destroyed) {
|
|
153
|
+
yield new Promise(resolve => {
|
|
154
|
+
reader.once('close', resolve);
|
|
155
|
+
reader.destroy();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
156
158
|
fs_1.default.renameSync(tempWorkPath, datasetPath);
|
|
157
159
|
return newLineCount;
|
|
158
160
|
});
|
|
@@ -209,10 +211,12 @@ class ConsumerExecutorClass {
|
|
|
209
211
|
writer.end();
|
|
210
212
|
});
|
|
211
213
|
// Ensure the reader is fully closed before renaming
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
if (!reader.destroyed) {
|
|
215
|
+
yield new Promise(resolve => {
|
|
216
|
+
reader.once('close', resolve);
|
|
217
|
+
reader.destroy();
|
|
218
|
+
});
|
|
219
|
+
}
|
|
216
220
|
fs_1.default.renameSync(tempWorkPath, datasetPath);
|
|
217
221
|
return winners.size;
|
|
218
222
|
});
|
|
@@ -109,6 +109,8 @@ class ExecutorOrchestratorClass {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
_progress.complete();
|
|
112
|
+
if (executorResults.some(x => !Algo_1.default.hasVal(x)))
|
|
113
|
+
throw new Error(`${executorResults.filter(x => !Algo_1.default.hasVal(x)).length} worker(s) failed to produce valid results`);
|
|
112
114
|
yield this.reconcileExecutorThreadsResults(scope, executorResults, tracker);
|
|
113
115
|
// If there is more than one worker, then I need to redo the operations that are done on multiple lines (cause now the worker files have been merged together)
|
|
114
116
|
const postOperation = { totalOutputCount: null };
|
|
@@ -119,7 +121,7 @@ class ExecutorOrchestratorClass {
|
|
|
119
121
|
tracker.measure('process-distinct:main', performance.now() - counter);
|
|
120
122
|
postOperation.totalOutputCount = unifiedOutputCount;
|
|
121
123
|
}
|
|
122
|
-
if ((
|
|
124
|
+
if ((_b = consumer.options) === null || _b === void 0 ? void 0 : _b.distinctOn) {
|
|
123
125
|
counter = performance.now();
|
|
124
126
|
const unifiedOutputCount = yield ConsumerExecutor_1.default.processDistinctOn(consumer, ExecutorScope_1.default.getMainPath(scope));
|
|
125
127
|
tracker.measure('process-distinct-on:main', performance.now() - counter);
|