Skip to content

Commit

Permalink
cleanup: move program options to variable to allow merging [1]
Browse files Browse the repository at this point in the history
  • Loading branch information
Phobetor committed Sep 6, 2019
1 parent f92a675 commit a9696d1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Services/RabbitMqSupervisor.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,8 @@ private function generateWorkerConfigurations($names, $baseCommand)

$command = sprintf('%s %s %s', $commandName, $name, implode(' ', $flags));

$programOptions = [
'command' => sprintf(
'%s %s %s --env=%s',
$this->paths['php_executable'],
$executablePath,
$command,
$this->environment
),
$programOptions = array(
'command' => sprintf('%s %s %s --env=%s', $this->paths['php_executable'], $executablePath, $command, $this->environment),
'process_name' => '%(program_name)s%(process_num)02d',
'numprocs' => (int) $this->getConsumerWorkerOption($name, 'count'),
'startsecs' => $this->getConsumerWorkerOption($name, 'startsecs'),
Expand All @@ -387,7 +381,7 @@ private function generateWorkerConfigurations($names, $baseCommand)
'stopwaitsecs' => $this->getConsumerWorkerOption($name, 'stopwaitsecs'),
'stdout_logfile' => $this->paths['worker_output_log_file'],
'stderr_logfile' => $this->paths['worker_error_log_file']
];
);

$this->generateWorkerConfiguration(
$name,
Expand Down

0 comments on commit a9696d1

Please sign in to comment.