@sentio/runtime 3.0.0-rc.10 → 3.0.0-rc.12

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.
@@ -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;
@@ -32697,17 +32699,20 @@ var ProcessorServiceImplV3 = class {
32697
32699
  await context2.awaitPendings();
32698
32700
  const { timeseriesResult, ...otherResults } = result;
32699
32701
  console.debug("sending ts data length:", result.timeseriesResult.length);
32700
- for (const ts of timeseriesResult) {
32702
+ for (let i = 0; i < timeseriesResult.length; i += TIME_SERIES_RESULT_BATCH_SIZE) {
32703
+ const batch = timeseriesResult.slice(i, i + TIME_SERIES_RESULT_BATCH_SIZE);
32701
32704
  subject.next({
32702
32705
  processId,
32703
32706
  tsRequest: {
32704
- data: [ts]
32707
+ data: batch
32705
32708
  }
32706
32709
  });
32707
32710
  }
32708
32711
  console.debug("sending binding result", processId);
32709
32712
  subject.next({
32710
- result: otherResults,
32713
+ result: WRITE_V2_EVENT_LOGS ? otherResults : {
32714
+ states: otherResults.states
32715
+ },
32711
32716
  processId
32712
32717
  });
32713
32718
  recordRuntimeInfo(result, binding.handlerType);