Remove the cert file parameter for the redis client. #206

This commit is contained in:
Korina Cordero 2019-05-06 01:25:04 +00:00
parent b6591fe28e
commit 161601ece5
3 changed files with 2 additions and 7 deletions

View file

@ -33,6 +33,5 @@ MQTT_CERT=/location/of/cert/file.crt
REDIS_CLIENT_SCHEME=tcp
REDIS_CLIENT_HOST=127.0.0.1
REDIS_CLIENT_PORT=6379
REDIS_CLIENT_CERTFILE=/location/of/cert/file.crt
REDIS_CLIENT_PASSWORD=foobared
#

View file

@ -80,7 +80,6 @@ services:
$scheme: "%env(REDIS_CLIENT_SCHEME)%"
$host: "%env(REDIS_CLIENT_HOST)%"
$port: "%env(REDIS_CLIENT_PORT)%"
$cert_file: "%env(REDIS_CLIENT_CERTFILE)%"
$password: "%env(REDIS_CLIENT_PASSWORD)%"
$env_flag: "dev"

View file

@ -10,16 +10,14 @@ class RedisClient
protected $scheme;
protected $host;
protected $port;
protected $cert_file;
protected $password;
protected $env_flag;
public function __construct($scheme, $host, $port, $cert_file, $password, $env_flag)
public function __construct($scheme, $host, $port, $password, $env_flag)
{
$this->scheme = $scheme;
$this->host = $host;
$this->port = $port;
$this->cert_file = $cert_file;
$this->password = $password;
$this->env_flag = $env_flag;
}
@ -39,8 +37,7 @@ class RedisClient
"scheme"=>$this->scheme,
"host"=>$this->host,
"port"=>$this->port,
"ssl"=>["cafile"=>$cert_file, "verify_peer"=>true],
"password"=>$password]);
"password"=>$this->password]);
}
return $this->redis;
}