Remove print and logging statements
@@ -121,8 +121,6 @@ class ConnectionRetryWrapper(object):
wrapped_callback(connection=connection, channel=channel)
should_stop = True
except connection.connection_errors + connection.channel_errors as e:
- print('Exception getting channel: %s' % str(e))
- self._logger.exception('RabbitMQ connection or channel error: %s.' % (str(e)))
should_stop, wait = self._retry_context.test_should_stop()
# reset channel to None to avoid any channel closing errors. At this point
# in case of an exception there should be no channel but that is better to
@@ -167,5 +165,8 @@ class ConnectionRetryWrapper(object):
:type obj: Must support mixin kombu.abstract.MaybeChannelBound
"""
with Timer(key='amqp.connection.ensure_and_publish'):
- ensuring_func = connection.ensure(obj, to_ensure_func, errback=self.errback, max_retries=3)
+ ensuring_func = connection.ensure(
+ obj, to_ensure_func,
+ errback=self.errback,
+ max_retries=3)
ensuring_func(**kwargs)
