From 7146762c4ff67d21682206e7a124cd867da4bb58 Mon Sep 17 00:00:00 2001 From: Paul Mansell Date: Wed, 29 Apr 2020 15:42:11 +0100 Subject: [PATCH] Updated return --- Command/GoBatchConsumerCommand.php | 2 +- Command/GoConsumerCommand.php | 2 +- RabbitMq/BatchConsumer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Command/GoBatchConsumerCommand.php b/Command/GoBatchConsumerCommand.php index 79a2017e..d5aba507 100644 --- a/Command/GoBatchConsumerCommand.php +++ b/Command/GoBatchConsumerCommand.php @@ -61,7 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output) // store response file_put_contents($input->getArgument('filename')."_response", json_encode($response)); // go application is expecting an exit code - exit(0); + return 0; } protected function getConsumerService() diff --git a/Command/GoConsumerCommand.php b/Command/GoConsumerCommand.php index 54bd1b71..78faf6ee 100644 --- a/Command/GoConsumerCommand.php +++ b/Command/GoConsumerCommand.php @@ -41,7 +41,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $response = call_user_func([$this->getContainer()->get($class), $method,], $msg); // go application is expecting an exit code that is translated into ack / nack - exit($this->processResponse($response)); + return $this->processResponse($response); } protected function getConsumerService() diff --git a/RabbitMq/BatchConsumer.php b/RabbitMq/BatchConsumer.php index 5381212d..658dc5ce 100644 --- a/RabbitMq/BatchConsumer.php +++ b/RabbitMq/BatchConsumer.php @@ -55,7 +55,7 @@ class BatchConsumer extends BaseAmqp implements DequeuerInterface /** * @var int number of seconds before graceful exit */ - protected $gracefulMaxExecutionSeconds; + protected $gracefulMaxExecutionSeconds = 0; /** * @var bool */