mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
Check deadline
This commit is contained in:
parent
3414acbec1
commit
b9510e72dd
@ -126,6 +126,15 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check deadline */
|
||||||
|
double deadline = params->Get("deadline");
|
||||||
|
if (Utility::GetTime() > deadline) {
|
||||||
|
Log(LogNotice, "ApiListener")
|
||||||
|
<< "Discarding 'ExecuteCheckFromQueue' event for checkable '" << checkable->GetName()
|
||||||
|
<< "' from '" << origin->FromClient->GetIdentity() << "': Deadline has expired.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Checkable::ExecuteCommandProcessFinishedHandler = [listener, sourceEndpoint, origin, params] (const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const Value& commandLine, const ProcessResult& pr) -> void {
|
Checkable::ExecuteCommandProcessFinishedHandler = [listener, sourceEndpoint, origin, params] (const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, const Value& commandLine, const ProcessResult& pr) -> void {
|
||||||
Checkable::CurrentConcurrentChecks.fetch_sub(1);
|
Checkable::CurrentConcurrentChecks.fetch_sub(1);
|
||||||
Checkable::DecreasePendingChecks();
|
Checkable::DecreasePendingChecks();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user