diff --git a/src/Queue/Connection/Redis.php b/src/Queue/Connection/Redis.php index 5f15dfd..d3230f6 100644 --- a/src/Queue/Connection/Redis.php +++ b/src/Queue/Connection/Redis.php @@ -202,6 +202,11 @@ protected function getRedis(): \Redis try { $redis->connect($this->host, $this->port, $connectTimeout); + if (!empty($this->password)) { + // ACL form when a username is configured, plain password otherwise. + $redis->auth(!empty($this->user) ? [$this->user, $this->password] : $this->password); + } + if ($this->readTimeout >= 0) { $redis->setOption(\Redis::OPT_READ_TIMEOUT, $this->readTimeout); }