raise test exception

This commit is contained in:
Julius Unverfehrt 2023-02-08 13:24:29 +01:00
parent 62d453dbe3
commit 4861d397fa

View File

@ -146,12 +146,12 @@ class QueueManager(object):
self._channel.basic_ack(frame.delivery_tag)
else:
self.logger.info(f"Processed message with delivery_tag {frame.delivery_tag}, declining message")
self._channel.basic_nack(frame.delivery_tag, requeue=False)
self._channel.basic_nack(frame.delivery_tag, requeue=True)
except Exception as ex:
n_attempts = _get_n_previous_attempts(properties) + 1
self.logger.warning(f"Failed to process message, {n_attempts} attempts, error: {str(ex)}")
self._channel.basic_nack(frame.delivery_tag, requeue=False)
self._channel.basic_nack(frame.delivery_tag, requeue=True)
raise ex
return callback