@workglow/task-graph 0.0.88 → 0.0.89
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/browser.js +8 -6
- package/dist/browser.js.map +5 -5
- package/dist/bun.js +8 -6
- package/dist/bun.js.map +5 -5
- package/dist/node.js +8 -6
- package/dist/node.js.map +5 -5
- package/dist/task/GraphAsTaskRunner.d.ts +3 -4
- package/dist/task/GraphAsTaskRunner.d.ts.map +1 -1
- package/dist/task-graph/ITaskGraph.d.ts +1 -1
- package/dist/task-graph/ITaskGraph.d.ts.map +1 -1
- package/dist/task-graph/TaskGraph.d.ts +1 -1
- package/dist/task-graph/TaskGraph.d.ts.map +1 -1
- package/dist/task-graph/TaskGraphRunner.d.ts +2 -1
- package/dist/task-graph/TaskGraphRunner.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/EXECUTION_MODEL.md +433 -0
package/dist/browser.js
CHANGED
|
@@ -1201,16 +1201,18 @@ class TaskGraphRunner {
|
|
|
1201
1201
|
await this.handleComplete();
|
|
1202
1202
|
return results;
|
|
1203
1203
|
}
|
|
1204
|
-
async runGraphReactive() {
|
|
1204
|
+
async runGraphReactive(input = {}) {
|
|
1205
1205
|
await this.handleStartReactive();
|
|
1206
1206
|
const results = [];
|
|
1207
1207
|
try {
|
|
1208
1208
|
for await (const task of this.reactiveScheduler.tasks()) {
|
|
1209
|
+
const isRootTask = this.graph.getSourceDataflows(task.config.id).length === 0;
|
|
1209
1210
|
if (task.status === TaskStatus.PENDING) {
|
|
1210
1211
|
task.resetInputData();
|
|
1211
1212
|
this.copyInputFromEdgesToNode(task);
|
|
1212
1213
|
}
|
|
1213
|
-
const
|
|
1214
|
+
const taskInput = isRootTask ? input : {};
|
|
1215
|
+
const taskResult = await task.runReactive(taskInput);
|
|
1214
1216
|
await this.pushOutputFromNodeToEdges(task, taskResult);
|
|
1215
1217
|
if (this.graph.getTargetDataflows(task.config.id).length === 0) {
|
|
1216
1218
|
results.push({
|
|
@@ -1511,7 +1513,7 @@ class GraphAsTaskRunner extends TaskRunner {
|
|
|
1511
1513
|
return results;
|
|
1512
1514
|
}
|
|
1513
1515
|
async executeTaskChildrenReactive() {
|
|
1514
|
-
return this.task.subGraph.runReactive();
|
|
1516
|
+
return this.task.subGraph.runReactive(this.task.runInputData);
|
|
1515
1517
|
}
|
|
1516
1518
|
async handleDisable() {
|
|
1517
1519
|
if (this.task.hasChildren()) {
|
|
@@ -2282,8 +2284,8 @@ class TaskGraph {
|
|
|
2282
2284
|
parentSignal: config?.parentSignal || undefined
|
|
2283
2285
|
});
|
|
2284
2286
|
}
|
|
2285
|
-
runReactive() {
|
|
2286
|
-
return this.runner.runGraphReactive();
|
|
2287
|
+
runReactive(input = {}) {
|
|
2288
|
+
return this.runner.runGraphReactive(input);
|
|
2287
2289
|
}
|
|
2288
2290
|
mergeExecuteOutputsToRunOutput(results, compoundMerge) {
|
|
2289
2291
|
return this.runner.mergeExecuteOutputsToRunOutput(results, compoundMerge);
|
|
@@ -3067,4 +3069,4 @@ export {
|
|
|
3067
3069
|
ConditionalTask
|
|
3068
3070
|
};
|
|
3069
3071
|
|
|
3070
|
-
//# debugId=
|
|
3072
|
+
//# debugId=262FD218D0D53F5964756E2164756E21
|