From a55633a6e164be4e7699efff91998263b10152e3 Mon Sep 17 00:00:00 2001 From: HypeMC Date: Thu, 19 Oct 2023 07:19:49 +0200 Subject: [PATCH] [Messenger] Fix graceful exit with ids --- Command/FailedMessagesRetryCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Command/FailedMessagesRetryCommand.php b/Command/FailedMessagesRetryCommand.php index 3bf4f81..ae47d77 100644 --- a/Command/FailedMessagesRetryCommand.php +++ b/Command/FailedMessagesRetryCommand.php @@ -124,7 +124,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $this->retrySpecificIds($failureTransportName, $ids, $io, $shouldForce); - $io->success('All done!'); + + if (!$this->shouldStop) { + $io->success('All done!'); + } return 0; } @@ -255,6 +258,10 @@ private function retrySpecificIds(string $failureTransportName, array $ids, Symf $singleReceiver = new SingleMessageReceiver($receiver, $envelope); $this->runWorker($failureTransportName, $singleReceiver, $io, $shouldForce); + + if ($this->shouldStop) { + break; + } } }