mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 17:14:25 +02:00
SleepCheckTask::ScriptFunc(): take CheckResultProducer::Ptr
This commit is contained in:
parent
4a553a9fff
commit
de6270ab78
@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
REGISTER_FUNCTION_NONCONST(Internal, SleepCheck, &SleepCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros");
|
REGISTER_FUNCTION_NONCONST(Internal, SleepCheck, &SleepCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
|
||||||
|
|
||||||
void SleepCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
void SleepCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
||||||
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
|
const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
|
||||||
{
|
{
|
||||||
REQUIRE_NOT_NULL(checkable);
|
REQUIRE_NOT_NULL(checkable);
|
||||||
REQUIRE_NOT_NULL(cr);
|
REQUIRE_NOT_NULL(cr);
|
||||||
@ -62,6 +62,6 @@ void SleepCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResu
|
|||||||
cr->SetExecutionEnd(now);
|
cr->SetExecutionEnd(now);
|
||||||
cr->SetCommand(commandName);
|
cr->SetCommand(commandName);
|
||||||
|
|
||||||
checkable->ProcessCheckResult(cr);
|
checkable->ProcessCheckResult(cr, producer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ class SleepCheckTask
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
static void ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
||||||
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
|
const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SleepCheckTask();
|
SleepCheckTask();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user