forked from GithubBackups/healthchecks
adaptiveSetInterval fires the first request immediately if runNow is true, in 3 seconds otherwise.
This commit is contained in:
parent
cfb294862f
commit
5c8b5b7b63
@ -40,8 +40,6 @@ function adaptiveSetInterval(fn, runNow) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (runNow) {
|
|
||||||
quota = 20;
|
quota = 20;
|
||||||
scheduleRun();
|
scheduledId = setTimeout(scheduleRun, runNow ? 1 : 3000);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user