lib-task-scheduler
Advanced tools
Comparing version 5.0.133 to 5.0.140
@@ -123,4 +123,3 @@ "use strict"; | ||
else { | ||
this.log.info(`Rescheduling task ${config.name} to now + ${relativeMs}ms.`); | ||
taskSchedule.nextExecutionEpochMs = nextExecutionEpochMs; | ||
throw new Error(`A task with a duplicate name (${config.name}) has already been scheduled`); | ||
} | ||
@@ -127,0 +126,0 @@ this.scheduleNext(); |
@@ -57,2 +57,12 @@ "use strict"; | ||
})); | ||
it(`Fails when a duplicate task is scheduled`, () => __awaiter(this, void 0, void 0, function* () { | ||
scheduler.schedule(task, taskConfig); | ||
try { | ||
scheduler.schedule(task, taskConfig); | ||
} | ||
catch (e) { | ||
return; | ||
} | ||
expect.fail('Expected an error'); | ||
})); | ||
it(`only executes one task at a time when tasks are long-running`, () => __awaiter(this, void 0, void 0, function* () { | ||
@@ -59,0 +69,0 @@ let taskCompletedOnce = false; |
{ | ||
"name": "lib-task-scheduler", | ||
"version": "5.0.133", | ||
"version": "5.0.140", | ||
"description": "A lightweight, modular task scheduler.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/convoyinc/lib-task-scheduler", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172997
2495