Get last CheckResult

This commit is contained in:
Mattia Codato 2020-07-03 08:43:50 +02:00
parent 41b379523e
commit 670835fd9a
1 changed files with 1 additions and 6 deletions

View File

@ -636,12 +636,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
MacroProcessor::EscapeCallback(), nullptr, false
);
double scheduled_start = checkable->GetNextCheck();
double before_check = Utility::GetTime();
CheckResult::Ptr cr = new CheckResult();
cr->SetScheduleStart(scheduled_start);
cr->SetExecutionStart(before_check);
CheckResult::Ptr cr = checkable->GetLastCheckResult();
/* Check if resolved_command exists and it is of type command_type */
Dictionary::Ptr execMacros = new Dictionary();