|
@@ 83-86 (lines=4) @@
|
| 80 |
|
$this->logger->debug('Cannot connect to Redis.'); |
| 81 |
|
throw new NotFoundException($this->l10n->t('Cannot connect to Redis.')); |
| 82 |
|
} |
| 83 |
|
if (!$redis->auth($this->config->getAppValue($this->appName, 'redisPassword', ''))) { |
| 84 |
|
$this->logger->debug('Redis authentication error.'); |
| 85 |
|
throw new NotFoundException($this->l10n->t('Redis authentication error.')); |
| 86 |
|
} |
| 87 |
|
if (!$redis->select(intval($this->config->getAppValue($this->appName, 'redisDb')))) { |
| 88 |
|
$this->logger->debug('Cannot connect to the right Redis database.'); |
| 89 |
|
throw new NotFoundException($this->l10n->t('Cannot connect to the right Redis database.')); |
|
@@ 87-90 (lines=4) @@
|
| 84 |
|
$this->logger->debug('Redis authentication error.'); |
| 85 |
|
throw new NotFoundException($this->l10n->t('Redis authentication error.')); |
| 86 |
|
} |
| 87 |
|
if (!$redis->select(intval($this->config->getAppValue($this->appName, 'redisDb')))) { |
| 88 |
|
$this->logger->debug('Cannot connect to the right Redis database.'); |
| 89 |
|
throw new NotFoundException($this->l10n->t('Cannot connect to the right Redis database.')); |
| 90 |
|
} |
| 91 |
|
$redis->setOption(\Redis::OPT_PREFIX, OcrConstants::REDIS_KEY_PREFIX); |
| 92 |
|
return $redis; |
| 93 |
|
} |