Skip to content

Commit

Permalink
make kombu DNS failures louder in the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpetrello committed Sep 30, 2019
1 parent b858001 commit ecb9682
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions awx/main/dispatch/kombu.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ class _Transport(pyamqp.Transport):
Connection = _Connection

self.transport_cls = _Transport

def ensure_connection(self, errback=None, **kwargs):
if errback is None:
# print a verbose error message so things like DNS failures to the
# RabbitMQ hostname are surfaced
errback = lambda exc, interval: logger.exception(exc)
return super(Connection, self).ensure_connection(
errback=errback, **kwargs
)

0 comments on commit ecb9682

Please sign in to comment.