@cadenza.io/core 3.2.0 → 3.3.1
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
}
|
|
@@ -3189,6 +3189,12 @@ var Cadenza = class {
|
|
|
3189
3189
|
throw new Error("Task or Routine name must be a non-empty string.");
|
|
3190
3190
|
}
|
|
3191
3191
|
}
|
|
3192
|
+
static runTask(task, context) {
|
|
3193
|
+
this.runner.run(task, context);
|
|
3194
|
+
}
|
|
3195
|
+
static runRoutine(routine, context) {
|
|
3196
|
+
this.runner.run(routine, context);
|
|
3197
|
+
}
|
|
3192
3198
|
/**
|
|
3193
3199
|
* Creates a standard Task and registers it in the GraphRegistry.
|
|
3194
3200
|
* @param name Unique identifier for the task.
|