@bian-womp/spark-graph 0.3.9 → 0.3.11

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/lib/cjs/index.cjs CHANGED
@@ -1829,9 +1829,9 @@ class NodeExecutor {
1829
1829
  // Setup timeout if needed
1830
1830
  const timeoutId = this.setupTimeout(node, controller, plan);
1831
1831
  // Create execution context
1832
- const ctx = this.createExecutionContext(nodeId, node, plan.effectiveInputs, plan.runId, controller.signal, plan.runContextIdsForRun, this.createEmitAndProgressHandlers(node, nodeId, plan));
1832
+ const execCtx = this.createExecutionContext(nodeId, node, plan.effectiveInputs, plan.runId, controller.signal, plan.runContextIdsForRun, this.createEmitAndProgressHandlers(node, nodeId, plan));
1833
1833
  // Execute
1834
- this.executeNode(node, nodeId, ctx, plan, controller, timeoutId, onDone);
1834
+ this.executeNode(node, nodeId, execCtx, plan, controller, timeoutId, onDone);
1835
1835
  }
1836
1836
  /**
1837
1837
  * Track run-context start for pending nodes
@@ -2251,11 +2251,11 @@ class GraphRuntime {
2251
2251
  for (const node of this.graph.getNodes().values()) {
2252
2252
  const effectiveInputs = this.nodeExecutor.getEffectiveInputs(node.nodeId);
2253
2253
  const ctrl = new AbortController();
2254
- const ctx = this.nodeExecutor.createExecutionContext(node.nodeId, node, effectiveInputs, `${node.nodeId}:init`, ctrl.signal);
2254
+ const execCtx = this.nodeExecutor.createExecutionContext(node.nodeId, node, effectiveInputs, `${node.nodeId}:init`, ctrl.signal);
2255
2255
  if (node.lifecycle?.prepare) {
2256
- ctx.log("debug", "prepare-start");
2257
- node.lifecycle.prepare(node.params ?? {}, ctx);
2258
- ctx.log("debug", "prepare-done");
2256
+ execCtx.log("debug", "prepare-start");
2257
+ node.lifecycle.prepare(node.params ?? {}, execCtx);
2258
+ execCtx.log("debug", "prepare-done");
2259
2259
  }
2260
2260
  node.runtime.onActivated?.();
2261
2261
  }
@@ -2523,11 +2523,11 @@ class GraphRuntime {
2523
2523
  this.graph.setNode(n.nodeId, newNode);
2524
2524
  const effectiveInputs = this.nodeExecutor.getEffectiveInputs(newNode.nodeId);
2525
2525
  const ctrl = new AbortController();
2526
- const ctx = this.nodeExecutor.createExecutionContext(newNode.nodeId, newNode, effectiveInputs, `${newNode.nodeId}:init`, ctrl.signal);
2526
+ const execCtx = this.nodeExecutor.createExecutionContext(newNode.nodeId, newNode, effectiveInputs, `${newNode.nodeId}:init`, ctrl.signal);
2527
2527
  if (newNode.lifecycle?.prepare) {
2528
- ctx.log("debug", "prepare-start");
2529
- newNode.lifecycle.prepare(newNode.params ?? {}, ctx);
2530
- ctx.log("debug", "prepare-done");
2528
+ execCtx.log("debug", "prepare-start");
2529
+ newNode.lifecycle.prepare(newNode.params ?? {}, execCtx);
2530
+ execCtx.log("debug", "prepare-done");
2531
2531
  }
2532
2532
  newNode.runtime.onActivated?.();
2533
2533
  }