MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetNextUpdate

Method GetNextUpdate

lib/icinga/checkable.cpp:252–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252Timestamp Checkable::GetNextUpdate() const
253{
254 auto cr (GetLastCheckResult());
255 double interval, latency;
256
257 // TODO: Document this behavior.
258 if (cr) {
259 interval = GetEnableActiveChecks() && GetProblem() && GetStateType() == StateTypeSoft ? GetRetryInterval() : GetCheckInterval();
260 latency = cr->GetExecutionEnd() - cr->GetScheduleStart();
261 } else {
262 interval = GetCheckInterval();
263 latency = 0.0;
264 }
265
266 return (GetEnableActiveChecks() ? GetNextCheck() : (cr ? cr->GetExecutionEnd() : Application::GetStartTime()) + interval) + interval + 2 * latency;
267}
268
269void Checkable::NotifyFixedDowntimeStart(const Downtime::Ptr& downtime)
270{

Callers 2

SerializeStateMethod · 0.80
ProcessQueueItemMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected