mirror of https://github.com/celery/kombu.git
Add a requeue_log_error method
In order to match how there is a ack_log_error and a reject_log_error it seems appropriate to also provide a requeue_log_error method that is provided in the message class.
This commit is contained in:
parent
d3a36c6750
commit
32ce45f14f
|
@ -102,6 +102,13 @@ class Message(object):
|
|||
logger.critical("Couldn't reject %r, reason: %r",
|
||||
self.delivery_tag, exc, exc_info=True)
|
||||
|
||||
def requeue_log_error(self, logger, errors):
|
||||
try:
|
||||
self.requeue()
|
||||
except errors as exc:
|
||||
logger.critical("Couldn't requeue %r, reason: %r",
|
||||
self.delivery_tag, exc, exc_info=True)
|
||||
|
||||
def reject(self, requeue=False):
|
||||
"""Reject this message.
|
||||
|
||||
|
|
Loading…
Reference in New Issue