VolatileState: Swallow exceptions

The web interface must remain accessible if the connection to the Icinga
Redis fails.
This commit is contained in:
Eric Lippmann 2019-12-06 12:22:32 +01:00
parent 7c7437132a
commit 51945a6111

View file

@ -2,6 +2,7 @@
namespace Icinga\Module\Icingadb\Model\Behavior;
use Exception;
use Icinga\Module\Icingadb\Common\IcingaRedis;
use Icinga\Module\Icingadb\Redis\VolatileState as RedisState;
use ipl\Orm\Contract\RetrieveBehavior;
@ -24,6 +25,10 @@ class VolatileState implements RetrieveBehavior
public function retrieve(Model $model)
{
$this->getVolatileState()->fetch($model);
try {
$this->getVolatileState()->fetch($model);
} catch (Exception $e) {
// Pass
}
}
}