mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Moved OnCheckResultReceived signal to the Service class.
This commit is contained in:
parent
61e381befc
commit
a1a3cb7d0f
@ -22,7 +22,6 @@
|
||||
using namespace icinga;
|
||||
|
||||
RingBuffer CIB::m_TaskStatistics(15 * 60);
|
||||
boost::signal<void (const CheckResultMessage&)> CIB::OnCheckResultReceived;
|
||||
|
||||
void CIB::UpdateTaskStatistics(long tv, int num)
|
||||
{
|
||||
|
@ -29,8 +29,6 @@ public:
|
||||
static void UpdateTaskStatistics(long tv, int num);
|
||||
static int GetTaskStatistics(long timespan);
|
||||
|
||||
static boost::signal<void (const CheckResultMessage&)> OnCheckResultReceived;
|
||||
|
||||
private:
|
||||
static RingBuffer m_TaskStatistics;
|
||||
};
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
using namespace icinga;
|
||||
|
||||
boost::signal<void (Service, const CheckResultMessage&)> Service::OnCheckResultReceived;
|
||||
|
||||
Service::Service(const ConfigObject::Ptr& configObject)
|
||||
: ConfigObjectAdapter(configObject)
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ enum ServiceStateType
|
||||
};
|
||||
|
||||
class CheckResult;
|
||||
class CheckResultMessage;
|
||||
class ServiceStatusMessage;
|
||||
|
||||
class I2_CIB_API Service : public ConfigObjectAdapter
|
||||
@ -103,6 +104,8 @@ public:
|
||||
static string StateTypeToString(ServiceStateType state);
|
||||
|
||||
static Dictionary::Ptr ResolveDependencies(Host host, const Dictionary::Ptr& dependencies);
|
||||
|
||||
static boost::signal<void (Service service, const CheckResultMessage&)> OnCheckResultReceived;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void CIBSyncComponent::CheckResultRequestHandler(const Endpoint::Ptr& sender, co
|
||||
if (!params.GetCheckResult(&cr))
|
||||
return;
|
||||
|
||||
CIB::OnCheckResultReceived(params);
|
||||
Service::OnCheckResultReceived(service, params);
|
||||
service.ApplyCheckResult(cr);
|
||||
|
||||
time_t now = Utility::GetTime();
|
||||
|
Loading…
x
Reference in New Issue
Block a user