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_SCHEME=tcp
REDIS_CLIENT_HOST=127.0.0.1 REDIS_CLIENT_HOST=127.0.0.1
REDIS_CLIENT_PORT=6379 REDIS_CLIENT_PORT=6379
REDIS_CLIENT_CERTFILE=/location/of/cert/file.crt
REDIS_CLIENT_PASSWORD=foobared REDIS_CLIENT_PASSWORD=foobared
# #

View file

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

View file

@ -10,16 +10,14 @@ class RedisClient
protected $scheme; protected $scheme;
protected $host; protected $host;
protected $port; protected $port;
protected $cert_file;
protected $password; protected $password;
protected $env_flag; 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->scheme = $scheme;
$this->host = $host; $this->host = $host;
$this->port = $port; $this->port = $port;
$this->cert_file = $cert_file;
$this->password = $password; $this->password = $password;
$this->env_flag = $env_flag; $this->env_flag = $env_flag;
} }
@ -39,8 +37,7 @@ class RedisClient
"scheme"=>$this->scheme, "scheme"=>$this->scheme,
"host"=>$this->host, "host"=>$this->host,
"port"=>$this->port, "port"=>$this->port,
"ssl"=>["cafile"=>$cert_file, "verify_peer"=>true], "password"=>$this->password]);
"password"=>$password]);
} }
return $this->redis; return $this->redis;
} }