From 6cfcc4fca1957512f1e7b5f402b4c81cd6a28eef Mon Sep 17 00:00:00 2001 From: Matthew Rardon Date: Tue, 3 Aug 2021 15:21:35 -0400 Subject: [PATCH] Add auth to StartWorkerCommand --- Command/StartWorkerCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Command/StartWorkerCommand.php b/Command/StartWorkerCommand.php index cc75907..69c4fcb 100644 --- a/Command/StartWorkerCommand.php +++ b/Command/StartWorkerCommand.php @@ -97,6 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $redisHost = $this->params->get('resque.redis.host'); $redisPort = $this->params->get('resque.redis.port'); $redisDatabase = $this->params->get('resque.redis.database'); + $redisPassword = $this->params->get('resque.redis.password'); if (null != $redisHost && null != $redisPort) { $env['REDIS_BACKEND'] = $redisHost.':'.$redisPort; @@ -106,6 +107,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $env['REDIS_BACKEND_DB'] = $redisDatabase; } + if (isset($redisPassword)) { + $env['REDIS_BACKEND_PASSWORD'] = $redisPassword; + } + $opt = ''; if (0 !== $m = (int) $input->getOption('memory-limit')) { $opt = sprintf('-d memory_limit=%dM', $m);