mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
parent
a7142252fa
commit
b3b2eb856b
@ -364,12 +364,6 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
|
OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Checkable::IsCheckPending(void) const
|
|
||||||
{
|
|
||||||
ObjectLock olock(this);
|
|
||||||
return m_CheckRunning;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
||||||
{
|
{
|
||||||
CONTEXT("Executing remote check for object '" + GetName() + "'");
|
CONTEXT("Executing remote check for object '" + GetName() + "'");
|
||||||
|
@ -104,8 +104,6 @@ public:
|
|||||||
|
|
||||||
Endpoint::Ptr GetCommandEndpoint(void) const;
|
Endpoint::Ptr GetCommandEndpoint(void) const;
|
||||||
|
|
||||||
bool IsCheckPending(void) const;
|
|
||||||
|
|
||||||
static double CalculateExecutionTime(const CheckResult::Ptr& cr);
|
static double CalculateExecutionTime(const CheckResult::Ptr& cr);
|
||||||
static double CalculateLatency(const CheckResult::Ptr& cr);
|
static double CalculateLatency(const CheckResult::Ptr& cr);
|
||||||
|
|
||||||
|
@ -406,8 +406,11 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
|
|||||||
Log(LogInformation, "ApiListener")
|
Log(LogInformation, "ApiListener")
|
||||||
<< "Finished sending config updates for endpoint '" << endpoint->GetName() << "'.";
|
<< "Finished sending config updates for endpoint '" << endpoint->GetName() << "'.";
|
||||||
|
|
||||||
if (!needSync)
|
if (!needSync) {
|
||||||
|
ObjectLock olock2(endpoint);
|
||||||
|
endpoint->SetSyncing(false);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Log(LogInformation, "ApiListener")
|
Log(LogInformation, "ApiListener")
|
||||||
<< "Sending replay log for endpoint '" << endpoint->GetName() << "'.";
|
<< "Sending replay log for endpoint '" << endpoint->GetName() << "'.";
|
||||||
@ -416,8 +419,10 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
|
|||||||
|
|
||||||
Log(LogInformation, "ApiListener")
|
Log(LogInformation, "ApiListener")
|
||||||
<< "Finished sending replay log for endpoint '" << endpoint->GetName() << "'.";
|
<< "Finished sending replay log for endpoint '" << endpoint->GetName() << "'.";
|
||||||
|
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
|
ObjectLock olock2(endpoint);
|
||||||
|
endpoint->SetSyncing(false);
|
||||||
|
|
||||||
Log(LogCritical, "ApiListener")
|
Log(LogCritical, "ApiListener")
|
||||||
<< "Error while syncing endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
|
<< "Error while syncing endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
|
||||||
}
|
}
|
||||||
@ -806,8 +811,11 @@ void ApiListener::ReplayLog(const JsonRpcConnection::Ptr& client)
|
|||||||
|
|
||||||
Zone::Ptr target_zone = target_endpoint->GetZone();
|
Zone::Ptr target_zone = target_endpoint->GetZone();
|
||||||
|
|
||||||
if (!target_zone)
|
if (!target_zone) {
|
||||||
|
ObjectLock olock2(endpoint);
|
||||||
|
endpoint->SetSyncing(false);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
boost::mutex::scoped_lock lock(m_LogLock);
|
boost::mutex::scoped_lock lock(m_LogLock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user