@cadenza.io/core 3.0.18 → 3.0.20
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -651,7 +651,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
651
651
|
setVerbose(value: boolean): void;
|
|
652
652
|
destroy(): void;
|
|
653
653
|
setStrategy(strategy: GraphRunStrategy): void;
|
|
654
|
-
startRun(context: AnyObject): boolean;
|
|
654
|
+
startRun(context: AnyObject, emit: (signal: string, ctx: AnyObject) => void): boolean;
|
|
655
655
|
}
|
|
656
656
|
|
|
657
657
|
declare class SignalBroker {
|
package/dist/index.d.ts
CHANGED
|
@@ -651,7 +651,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
651
651
|
setVerbose(value: boolean): void;
|
|
652
652
|
destroy(): void;
|
|
653
653
|
setStrategy(strategy: GraphRunStrategy): void;
|
|
654
|
-
startRun(context: AnyObject): boolean;
|
|
654
|
+
startRun(context: AnyObject, emit: (signal: string, ctx: AnyObject) => void): boolean;
|
|
655
655
|
}
|
|
656
656
|
|
|
657
657
|
declare class SignalBroker {
|
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 (
|
|
899
|
+
if (context2.context.__isDeputy)
|
|
901
900
|
this.emitWithMetadata(
|
|
902
|
-
`meta.node.graph_completed:${
|
|
903
|
-
context2
|
|
901
|
+
`meta.node.graph_completed:${this.routineExecId}`,
|
|
902
|
+
context2.context
|
|
904
903
|
);
|
|
905
|
-
this.emitMetricsWithMetadata(
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
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
|
}
|
|
@@ -2215,6 +2211,7 @@ var GraphRegistry = class _GraphRegistry {
|
|
|
2215
2211
|
const { __name } = context;
|
|
2216
2212
|
for (const task of this.tasks.values()) {
|
|
2217
2213
|
if (task.name === __name) {
|
|
2214
|
+
console.log("TASK FOUND", task.name);
|
|
2218
2215
|
return { ...context, __task: task };
|
|
2219
2216
|
}
|
|
2220
2217
|
}
|
|
@@ -2479,15 +2476,21 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2479
2476
|
this.currentRun = new GraphRun(this.strategy);
|
|
2480
2477
|
}
|
|
2481
2478
|
}
|
|
2482
|
-
startRun(context) {
|
|
2483
|
-
var _a;
|
|
2479
|
+
startRun(context, emit) {
|
|
2480
|
+
var _a, _b, _c;
|
|
2481
|
+
console.log("START RUN", context);
|
|
2484
2482
|
if (context.__task || context.__routine) {
|
|
2485
2483
|
const routine = (_a = context.__task) != null ? _a : context.__routine;
|
|
2484
|
+
delete context.__task;
|
|
2485
|
+
delete context.__routine;
|
|
2486
|
+
context.__routineExecId = (_c = (_b = context.__metadata) == null ? void 0 : _b.__deputyExecId) != null ? _c : null;
|
|
2487
|
+
context.__isDeputy = true;
|
|
2486
2488
|
this.run(routine, context);
|
|
2487
2489
|
return true;
|
|
2488
2490
|
} else {
|
|
2489
2491
|
context.errored = true;
|
|
2490
2492
|
context.__error = "No routine or task defined.";
|
|
2493
|
+
emit("meta.runner.failed", context);
|
|
2491
2494
|
return false;
|
|
2492
2495
|
}
|
|
2493
2496
|
}
|