@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.d.mts
CHANGED
|
@@ -827,6 +827,8 @@ declare class Cadenza {
|
|
|
827
827
|
* @throws Error if invalid.
|
|
828
828
|
*/
|
|
829
829
|
static validateName(name: string): void;
|
|
830
|
+
static runTask(task: Task, context: AnyObject): void;
|
|
831
|
+
static runRoutine(routine: GraphRoutine, context: AnyObject): void;
|
|
830
832
|
/**
|
|
831
833
|
* Creates a standard Task and registers it in the GraphRegistry.
|
|
832
834
|
* @param name Unique identifier for the task.
|
package/dist/index.d.ts
CHANGED
|
@@ -827,6 +827,8 @@ declare class Cadenza {
|
|
|
827
827
|
* @throws Error if invalid.
|
|
828
828
|
*/
|
|
829
829
|
static validateName(name: string): void;
|
|
830
|
+
static runTask(task: Task, context: AnyObject): void;
|
|
831
|
+
static runRoutine(routine: GraphRoutine, context: AnyObject): void;
|
|
830
832
|
/**
|
|
831
833
|
* Creates a standard Task and registers it in the GraphRegistry.
|
|
832
834
|
* @param name Unique identifier for the task.
|
package/dist/index.js
CHANGED
|
@@ -1107,7 +1107,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
1107
1107
|
this.retries++;
|
|
1108
1108
|
await sleep(this.retryDelay);
|
|
1109
1109
|
this.retryDelay *= this.task.retryDelayFactor;
|
|
1110
|
-
if (this.retryDelay > this.task.retryDelayMax) {
|
|
1110
|
+
if (this.task.retryDelayMax > 0 && this.retryDelay > this.task.retryDelayMax) {
|
|
1111
1111
|
this.retryDelay = this.task.retryDelayMax;
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
@@ -3226,6 +3226,12 @@ var Cadenza = class {
|
|
|
3226
3226
|
throw new Error("Task or Routine name must be a non-empty string.");
|
|
3227
3227
|
}
|
|
3228
3228
|
}
|
|
3229
|
+
static runTask(task, context) {
|
|
3230
|
+
this.runner.run(task, context);
|
|
3231
|
+
}
|
|
3232
|
+
static runRoutine(routine, context) {
|
|
3233
|
+
this.runner.run(routine, context);
|
|
3234
|
+
}
|
|
3229
3235
|
/**
|
|
3230
3236
|
* Creates a standard Task and registers it in the GraphRegistry.
|
|
3231
3237
|
* @param name Unique identifier for the task.
|