mirror of https://github.com/Icinga/icinga2.git
Checkable#Start(): if #last_check_started > last check, set #next_check to #last_check_started
refs #7888
This commit is contained in:
parent
4585a404d6
commit
37c2c7ba90
|
@ -63,6 +63,14 @@ void Checkable::Start(bool runtimeCreated)
|
||||||
{
|
{
|
||||||
double now = Utility::GetTime();
|
double now = Utility::GetTime();
|
||||||
|
|
||||||
|
{
|
||||||
|
auto cr (GetLastCheckResult());
|
||||||
|
|
||||||
|
if (GetLastCheckStarted() > (cr ? cr->GetExecutionEnd() : 0.0)) {
|
||||||
|
SetNextCheck(GetLastCheckStarted());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GetNextCheck() < now + 60) {
|
if (GetNextCheck() < now + 60) {
|
||||||
double delta = std::min(GetCheckInterval(), 60.0);
|
double delta = std::min(GetCheckInterval(), 60.0);
|
||||||
delta *= (double)std::rand() / RAND_MAX;
|
delta *= (double)std::rand() / RAND_MAX;
|
||||||
|
|
Loading…
Reference in New Issue