@cadenza.io/core 3.3.0 → 3.4.0

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.mjs CHANGED
@@ -1070,7 +1070,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1070
1070
  this.retries++;
1071
1071
  await sleep(this.retryDelay);
1072
1072
  this.retryDelay *= this.task.retryDelayFactor;
1073
- if (this.retryDelay > this.task.retryDelayMax) {
1073
+ if (this.task.retryDelayMax > 0 && this.retryDelay > this.task.retryDelayMax) {
1074
1074
  this.retryDelay = this.task.retryDelayMax;
1075
1075
  }
1076
1076
  }
@@ -1514,6 +1514,7 @@ var Task = class extends SignalEmitter {
1514
1514
  this.predecessorTasks = /* @__PURE__ */ new Set();
1515
1515
  this.destroyed = false;
1516
1516
  this.register = true;
1517
+ this.registered = false;
1517
1518
  this.emitsSignals = /* @__PURE__ */ new Set();
1518
1519
  this.signalsToEmitAfter = /* @__PURE__ */ new Set();
1519
1520
  this.signalsToEmitOnFail = /* @__PURE__ */ new Set();
@@ -3189,6 +3190,12 @@ var Cadenza = class {
3189
3190
  throw new Error("Task or Routine name must be a non-empty string.");
3190
3191
  }
3191
3192
  }
3193
+ static runTask(task, context) {
3194
+ this.runner.run(task, context);
3195
+ }
3196
+ static runRoutine(routine, context) {
3197
+ this.runner.run(routine, context);
3198
+ }
3192
3199
  /**
3193
3200
  * Creates a standard Task and registers it in the GraphRegistry.
3194
3201
  * @param name Unique identifier for the task.