@cadenza.io/core 3.0.18 → 3.0.19

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/dist/index.js CHANGED
@@ -862,7 +862,6 @@ var GraphNode = class _GraphNode extends SignalEmitter {
862
862
  return this.executionStart;
863
863
  }
864
864
  end() {
865
- var _a;
866
865
  if (this.executionStart === 0) {
867
866
  return 0;
868
867
  }
@@ -897,24 +896,21 @@ var GraphNode = class _GraphNode extends SignalEmitter {
897
896
  });
898
897
  if (this.graphDone()) {
899
898
  const context2 = this.context.export();
900
- if ((_a = context2.context.__metadata) == null ? void 0 : _a.__deputyExecId)
899
+ if (context2.context.__isDeputy)
901
900
  this.emitWithMetadata(
902
- `meta.node.graph_completed:${context2.context.__metadata.__deputyExecId}`,
903
- context2
901
+ `meta.node.graph_completed:${this.routineExecId}`,
902
+ context2.context
904
903
  );
905
- this.emitMetricsWithMetadata(
906
- `meta.node.ended_routine_execution:${this.routineExecId}`,
907
- {
908
- data: {
909
- isRunning: false,
910
- isComplete: true,
911
- resultContext: this.context.export(),
912
- progress: 1,
913
- ended: formatTimestamp(end)
914
- },
915
- filter: { uuid: this.routineExecId }
916
- }
917
- );
904
+ this.emitMetricsWithMetadata("meta.node.ended_routine_execution", {
905
+ data: {
906
+ isRunning: false,
907
+ isComplete: true,
908
+ resultContext: context2,
909
+ progress: 1,
910
+ ended: formatTimestamp(end)
911
+ },
912
+ filter: { uuid: this.routineExecId }
913
+ });
918
914
  }
919
915
  return end;
920
916
  }
@@ -2480,9 +2476,13 @@ var GraphRunner = class extends SignalEmitter {
2480
2476
  }
2481
2477
  }
2482
2478
  startRun(context) {
2483
- var _a;
2479
+ var _a, _b, _c;
2484
2480
  if (context.__task || context.__routine) {
2485
2481
  const routine = (_a = context.__task) != null ? _a : context.__routine;
2482
+ delete context.__task;
2483
+ delete context.__routine;
2484
+ context.__routineExecId = (_c = (_b = context.__metadata) == null ? void 0 : _b.__deputyExecId) != null ? _c : null;
2485
+ context.__isDeputy = true;
2486
2486
  this.run(routine, context);
2487
2487
  return true;
2488
2488
  } else {