protected function SensorResult::assessComparison in Monitoring 8
Same name and namespace in other branches
- 7 lib/Drupal/monitoring/Result/SensorResult.php \Drupal\monitoring\Result\SensorResult::assessComparison()
Performs comparison of expected and actual sensor values.
1 call to SensorResult::assessComparison()
- SensorResult::compile in src/
Result/ SensorResult.php - Compiles added status messages sets the status.
File
- src/
Result/ SensorResult.php, line 279
Class
- SensorResult
- Generic container for the sensor result.
Namespace
Drupal\monitoring\ResultCode
protected function assessComparison() {
if ($this
->getValue() != $this
->getExpectedValue()) {
$this
->setStatus(SensorResultInterface::STATUS_CRITICAL);
}
else {
$this
->setStatus(SensorResultInterface::STATUS_OK);
}
}