Skip to content

Commit

Permalink
Merge pull request #61 from mrardon/5.x
Browse files Browse the repository at this point in the history
Add auth to StartWorkerCommand
  • Loading branch information
PhilETaylor authored Sep 30, 2021
2 parents 8777fa9 + 6cfcc4f commit 317db18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Command/StartWorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,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;
Expand All @@ -104,6 +105,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);
Expand Down

0 comments on commit 317db18

Please sign in to comment.