raise test exception
This commit is contained in:
parent
62d453dbe3
commit
4861d397fa
@ -146,12 +146,12 @@ class QueueManager(object):
|
|||||||
self._channel.basic_ack(frame.delivery_tag)
|
self._channel.basic_ack(frame.delivery_tag)
|
||||||
else:
|
else:
|
||||||
self.logger.info(f"Processed message with delivery_tag {frame.delivery_tag}, declining message")
|
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:
|
except Exception as ex:
|
||||||
n_attempts = _get_n_previous_attempts(properties) + 1
|
n_attempts = _get_n_previous_attempts(properties) + 1
|
||||||
self.logger.warning(f"Failed to process message, {n_attempts} attempts, error: {str(ex)}")
|
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
|
raise ex
|
||||||
|
|
||||||
return callback
|
return callback
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user