mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 12:44:58 +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) {
|
||||
case Result::Ok:
|
||||
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:
|
||||
return ApiActions::CreateResult(503, "Could not process check result for object '" + checkable->GetName() + "' because the object is inactive.");
|
||||
case Result::NewerCheckResultPresent:
|
||||
|
@ -100,14 +100,13 @@ Checkable::ProcessingResult Checkable::ProcessCheckResult(const CheckResult::Ptr
|
||||
{
|
||||
using Result = Checkable::ProcessingResult;
|
||||
|
||||
VERIFY(cr);
|
||||
|
||||
{
|
||||
ObjectLock olock(this);
|
||||
m_CheckRunning = false;
|
||||
}
|
||||
|
||||
if (!cr)
|
||||
return Result::NoCheckResult;
|
||||
|
||||
double now = Utility::GetTime();
|
||||
|
||||
if (cr->GetScheduleStart() == 0)
|
||||
|
@ -14,7 +14,10 @@ static void CheckableProcessCheckResult(const CheckResult::Ptr& cr)
|
||||
ScriptFrame *vframe = ScriptFrame::GetCurrentFrame();
|
||||
Checkable::Ptr self = vframe->Self;
|
||||
REQUIRE_NOT_NULL(self);
|
||||
self->ProcessCheckResult(cr);
|
||||
|
||||
if (cr) {
|
||||
self->ProcessCheckResult(cr);
|
||||
}
|
||||
}
|
||||
|
||||
Object::Ptr Checkable::GetPrototype()
|
||||
|
@ -119,7 +119,6 @@ public:
|
||||
enum class ProcessingResult
|
||||
{
|
||||
Ok,
|
||||
NoCheckResult,
|
||||
CheckableInactive,
|
||||
NewerCheckResultPresent,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user