mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Merge pull request #10444 from Icinga/ProcessingResult-NoCheckResult
Remove unused ProcessingResult::NoCheckResult
This commit is contained in:
commit
5c20b1ae12
@ -130,8 +130,6 @@ Dictionary::Ptr ApiActions::ProcessCheckResult(const ConfigObject::Ptr& object,
|
|||||||
switch (result) {
|
switch (result) {
|
||||||
case Result::Ok:
|
case Result::Ok:
|
||||||
return ApiActions::CreateResult(200, "Successfully processed check result for object '" + checkable->GetName() + "'.");
|
return ApiActions::CreateResult(200, "Successfully processed check result for object '" + checkable->GetName() + "'.");
|
||||||
case Result::NoCheckResult:
|
|
||||||
return ApiActions::CreateResult(400, "Could not process check result for object '" + checkable->GetName() + "' because no check result was passed.");
|
|
||||||
case Result::CheckableInactive:
|
case Result::CheckableInactive:
|
||||||
return ApiActions::CreateResult(503, "Could not process check result for object '" + checkable->GetName() + "' because the object is inactive.");
|
return ApiActions::CreateResult(503, "Could not process check result for object '" + checkable->GetName() + "' because the object is inactive.");
|
||||||
case Result::NewerCheckResultPresent:
|
case Result::NewerCheckResultPresent:
|
||||||
|
@ -100,14 +100,13 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
|
|||||||
{
|
{
|
||||||
using Result = Checkable::ProcessingResult;
|
using Result = Checkable::ProcessingResult;
|
||||||
|
|
||||||
|
VERIFY(cr);
|
||||||
|
|
||||||
{
|
{
|
||||||
ObjectLock olock(this);
|
ObjectLock olock(this);
|
||||||
m_CheckRunning = false;
|
m_CheckRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cr)
|
|
||||||
return Result::NoCheckResult;
|
|
||||||
|
|
||||||
double now = Utility::GetTime();
|
double now = Utility::GetTime();
|
||||||
|
|
||||||
if (cr->GetScheduleStart() == 0)
|
if (cr->GetScheduleStart() == 0)
|
||||||
|
@ -14,7 +14,10 @@ static void CheckableProcessCheckResult(const CheckResult::Ptr& cr)
|
|||||||
ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
|
ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
|
||||||
Checkable::Ptr self = vframe->Self;
|
Checkable::Ptr self = vframe->Self;
|
||||||
REQUIRE_NOT_NULL(self);
|
REQUIRE_NOT_NULL(self);
|
||||||
self->ProcessCheckResult(cr);
|
|
||||||
|
if (cr) {
|
||||||
|
self->ProcessCheckResult(cr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object::Ptr Checkable::GetPrototype()
|
Object::Ptr Checkable::GetPrototype()
|
||||||
|
@ -119,7 +119,6 @@ public:
|
|||||||
enum class ProcessingResult
|
enum class ProcessingResult
|
||||||
{
|
{
|
||||||
Ok,
|
Ok,
|
||||||
NoCheckResult,
|
|
||||||
CheckableInactive,
|
CheckableInactive,
|
||||||
NewerCheckResultPresent,
|
NewerCheckResultPresent,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user