mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-15 01:12:54 -05:00
BpNode: set missing to unknown before fetching...
...sorting state refs #105
This commit is contained in:
parent
9750e13234
commit
14e30e4741
1 changed files with 4 additions and 4 deletions
|
|
@ -326,19 +326,19 @@ class BpNode extends Node
|
|||
|
||||
if (!$this->hasChildren()) {
|
||||
// TODO: delegate this to operators, should mostly fail
|
||||
$this->state = 3;
|
||||
$this->setState(self::ICINGA_UNKNOWN);
|
||||
$this->setMissing();
|
||||
return $this;
|
||||
}
|
||||
|
||||
foreach ($this->getChildren() as $child) {
|
||||
$bp->beginLoopDetection($this->name);
|
||||
$sort_states[] = $child->getSortingState();
|
||||
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
|
||||
$bp->endLoopDetection($this->name);
|
||||
if ($child instanceof MonitoredNode && $child->isMissing()) {
|
||||
$child->setState(self::ICINGA_UNKNOWN);
|
||||
}
|
||||
$sort_states[] = $child->getSortingState();
|
||||
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
|
||||
$bp->endLoopDetection($this->name);
|
||||
}
|
||||
|
||||
$this->setLastStateChange($lastStateChange);
|
||||
|
|
|
|||
Loading…
Reference in a new issue