@sentio/runtime 2.60.0-rc.12 → 2.60.0-rc.14

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.
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6XHWJ2VS.js";
6
6
  import {
7
7
  setupLogger
8
- } from "./chunk-CYS2DAE4.js";
8
+ } from "./chunk-26X74ASV.js";
9
9
  import {
10
10
  DataBindingContext,
11
11
  DiagConsoleLogger,
@@ -50,7 +50,7 @@ import {
50
50
  require_src,
51
51
  trace,
52
52
  withAbort
53
- } from "./chunk-BOHR42T4.js";
53
+ } from "./chunk-2JZQGMEZ.js";
54
54
  import {
55
55
  ExecutionConfig,
56
56
  HandlerType,
@@ -68,7 +68,7 @@ import {
68
68
  __toCommonJS,
69
69
  __toESM,
70
70
  require_minimal2 as require_minimal
71
- } from "./chunk-TC6OWLVA.js";
71
+ } from "./chunk-ZTW66EYL.js";
72
72
 
73
73
  // ../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.25.1/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js
74
74
  // @__NO_SIDE_EFFECTS__
@@ -26509,6 +26509,15 @@ var ProcessorServiceImplV3 = class {
26509
26509
  }
26510
26510
  async *processBindingsStream(requests, context2) {
26511
26511
  const subject = new import_rxjs.Subject();
26512
+ this.handleRequests(requests, subject).then(() => {
26513
+ subject.complete();
26514
+ }).catch((e) => {
26515
+ console.error(e);
26516
+ subject.error(e);
26517
+ });
26518
+ yield* from(subject).pipe(withAbort(context2.signal));
26519
+ }
26520
+ async handleRequests(requests, subject) {
26512
26521
  let lastBinding = void 0;
26513
26522
  for await (const request3 of requests) {
26514
26523
  try {
@@ -26520,7 +26529,6 @@ var ProcessorServiceImplV3 = class {
26520
26529
  console.error("unexpect error during handle loop", e);
26521
26530
  }
26522
26531
  }
26523
- yield* from(subject).pipe(withAbort(context2.signal));
26524
26532
  }
26525
26533
  contexts = new Contexts2();
26526
26534
  async handleRequest(request3, lastBinding, subject) {
@@ -26535,6 +26543,7 @@ var ProcessorServiceImplV3 = class {
26535
26543
  }
26536
26544
  if (this.enablePartition) {
26537
26545
  try {
26546
+ console.debug("sending partition request", request3.binding);
26538
26547
  const partitions = await PluginManager.INSTANCE.partition(request3.binding);
26539
26548
  subject.next({
26540
26549
  processId: request3.processId,
@@ -26569,8 +26578,11 @@ var ProcessorServiceImplV3 = class {
26569
26578
  startProcess(processId, binding, subject) {
26570
26579
  const context2 = this.contexts.new(processId, subject);
26571
26580
  const start = Date.now();
26581
+ console.debug("process binding", processId);
26572
26582
  PluginManager.INSTANCE.processBinding(binding, void 0, context2).then(async (result) => {
26583
+ console.debug(`process binding ${processId} done`);
26573
26584
  await context2.awaitPendings();
26585
+ console.debug("sending ts data length:", result.timeseriesResult.length);
26574
26586
  for (const ts of result.timeseriesResult) {
26575
26587
  subject.next({
26576
26588
  processId,
@@ -26580,6 +26592,7 @@ var ProcessorServiceImplV3 = class {
26580
26592
  });
26581
26593
  }
26582
26594
  if (result.states?.configUpdated) {
26595
+ console.debug("sending tpl updates:");
26583
26596
  subject.next({
26584
26597
  processId,
26585
26598
  tplRequest: {
@@ -26587,6 +26600,7 @@ var ProcessorServiceImplV3 = class {
26587
26600
  }
26588
26601
  });
26589
26602
  }
26603
+ console.debug("sending binding result", processId);
26590
26604
  subject.next({
26591
26605
  result: {
26592
26606
  states: result.states,
@@ -26603,6 +26617,7 @@ var ProcessorServiceImplV3 = class {
26603
26617
  const cost = Date.now() - start;
26604
26618
  process_binding_time.add(cost);
26605
26619
  this.contexts.delete(processId);
26620
+ console.debug("process binding done", processId);
26606
26621
  });
26607
26622
  }
26608
26623
  async configureHandlers(request3, context2) {