@sentio/runtime 3.0.0-rc.11 → 3.0.0-rc.13
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.
- package/lib/{chunk-AFB5F2CR.js → chunk-33ACY4F2.js} +1 -2
- package/lib/{chunk-AFB5F2CR.js.map → chunk-33ACY4F2.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +9 -9
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +1 -1
- package/package.json +1 -1
- package/src/db-context.ts +0 -1
- package/src/service-v3.ts +11 -18
package/lib/index.js
CHANGED
package/lib/processor-runner.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
require_lib4,
|
|
27
27
|
require_src,
|
|
28
28
|
withAbort
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-33ACY4F2.js";
|
|
30
30
|
import {
|
|
31
31
|
ExecutionConfig,
|
|
32
32
|
HandlerType,
|
|
@@ -32588,6 +32588,8 @@ import("node:process").then((p) => p.stdout.write(""));
|
|
|
32588
32588
|
var import_nice_grpc = __toESM(require_lib3(), 1);
|
|
32589
32589
|
var import_rxjs = __toESM(require_cjs(), 1);
|
|
32590
32590
|
var { process_binding_count, process_binding_time, process_binding_error } = processMetrics;
|
|
32591
|
+
var WRITE_V2_EVENT_LOGS = process.env.WRITE_V2_EVENT_LOGS !== "false";
|
|
32592
|
+
var TIME_SERIES_RESULT_BATCH_SIZE = 1e3;
|
|
32591
32593
|
var ProcessorServiceImplV3 = class {
|
|
32592
32594
|
enablePartition;
|
|
32593
32595
|
loader;
|
|
@@ -32691,23 +32693,22 @@ var ProcessorServiceImplV3 = class {
|
|
|
32691
32693
|
startProcess(processId, binding, subject) {
|
|
32692
32694
|
const context2 = this.contexts.new(processId, subject);
|
|
32693
32695
|
const start = Date.now();
|
|
32694
|
-
console.debug("process binding", processId);
|
|
32695
32696
|
PluginManager.INSTANCE.processBinding(binding, void 0, context2).then(async (result) => {
|
|
32696
|
-
console.debug(`process binding ${processId} done`);
|
|
32697
32697
|
await context2.awaitPendings();
|
|
32698
32698
|
const { timeseriesResult, ...otherResults } = result;
|
|
32699
|
-
|
|
32700
|
-
|
|
32699
|
+
for (let i = 0; i < timeseriesResult.length; i += TIME_SERIES_RESULT_BATCH_SIZE) {
|
|
32700
|
+
const batch = timeseriesResult.slice(i, i + TIME_SERIES_RESULT_BATCH_SIZE);
|
|
32701
32701
|
subject.next({
|
|
32702
32702
|
processId,
|
|
32703
32703
|
tsRequest: {
|
|
32704
|
-
data:
|
|
32704
|
+
data: batch
|
|
32705
32705
|
}
|
|
32706
32706
|
});
|
|
32707
32707
|
}
|
|
32708
|
-
console.debug("sending binding result", processId);
|
|
32709
32708
|
subject.next({
|
|
32710
|
-
result: otherResults
|
|
32709
|
+
result: WRITE_V2_EVENT_LOGS ? otherResults : {
|
|
32710
|
+
states: otherResults.states
|
|
32711
|
+
},
|
|
32711
32712
|
processId
|
|
32712
32713
|
});
|
|
32713
32714
|
recordRuntimeInfo(result, binding.handlerType);
|
|
@@ -32719,7 +32720,6 @@ var ProcessorServiceImplV3 = class {
|
|
|
32719
32720
|
const cost = Date.now() - start;
|
|
32720
32721
|
process_binding_time.add(cost);
|
|
32721
32722
|
this.contexts.delete(processId);
|
|
32722
|
-
console.debug("process binding done", processId);
|
|
32723
32723
|
});
|
|
32724
32724
|
}
|
|
32725
32725
|
async updateTemplates(request, context2) {
|