From 4f1ade2e0cf394a77565b072dfaf6e6b87717db7 Mon Sep 17 00:00:00 2001 From: "stanislav.kovin" Date: Thu, 2 Jul 2020 12:15:25 +0300 Subject: [PATCH] SCENTRE-6712 Low log level for attempts count maximum --- src/Consumer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Consumer.php b/src/Consumer.php index efc984c..8e2c202 100644 --- a/src/Consumer.php +++ b/src/Consumer.php @@ -80,11 +80,13 @@ public function execute(AMQPMessage $message): int return $this->doExecute( $this->queueService->getToProcess($data['id']) ); - } catch (UnexpectedValueException | AttemptsReachedException $exception) { + } catch (UnexpectedValueException $exception) { $this->logger->alert($exception->getMessage(), $this->getMessageLogParams($message)); - - return self::MSG_REJECT; + } catch (AttemptsReachedException $exception) { + $this->logger->notice($exception->getMessage(), $this->getMessageLogParams($message)); } + + return self::MSG_REJECT; } protected function doExecute(QueueEntityInterface $queueEntity): int