Merge pull request #3684 from alchemy-fr/PHRAS-3129-worker-rabbit-not-up

PHRAS-3129 Docker - Worker - if rabbitMQ is not up, worker need to exit with 1
This commit is contained in:
Nicolas Maillat
2021-01-06 18:08:19 +01:00
committed by GitHub

View File

@@ -45,7 +45,7 @@ class WorkerExecuteCommand extends Command
if ($channel == null) {
$output->writeln("Can't connect to rabbit, check configuration!");
return;
return 1;
}
$serverConnection->declareExchange();
@@ -56,7 +56,7 @@ class WorkerExecuteCommand extends Command
if ($input->getOption('max-processes') != null && $maxProcesses == 0) {
$output->writeln('<error>Invalid max-processes option.Need an integer</error>');
return;
return 1;
} elseif($maxProcesses) {
$workerInvoker->setMaxProcessPoolValue($maxProcesses);
}