Added next execution lapse time

This commit is contained in:
Luis Fernando Molina committed 2018-02-18 13:50:14 +01:00
1 parent 17f2f0931f
commit 48864dc53e
2 files changed
+9 -2

No files matched your search

Binary file not shown.
+9 -2
View File
@@ -159,7 +159,7 @@
}
}
function loopControl(moreIntervalExecutionsNeeded) {
function loopControl(moreIntervalExecutionsNeeded, nextIntervalLapse) {
if (moreIntervalExecutionsNeeded === true) {
@@ -175,8 +175,15 @@
const logText = "[WARN] 'loopControl'. Staring new Interval. ";
logger.write(logText);
setTimeout(startNewInterval, processConfig.intervalLapse);// Looped Execution.
if (nextIntervalLapse === undefined) {
setTimeout(startNewInterval, processConfig.intervalLapse);// Looped Execution.
} else {
setTimeout(startNewInterval, nextIntervalLapse);
}
}
} else {