Remove small unneeded code from impl_kombu
If a publish fails, we reconnect to rabbit. In this case, we try to declare the publisher exchange... and loop around and do the same thing again after grabbing a new class instance. This removes the extra code. Change-Id: I99089ccfb93bb860d5221c267f35a16c1faf3707
This commit is contained in:
@@ -449,7 +449,6 @@ class Connection(object):
|
||||
def publisher_send(self, cls, topic, msg, **kwargs):
|
||||
"""Send to a publisher based on the publisher class"""
|
||||
while True:
|
||||
publisher = None
|
||||
try:
|
||||
publisher = cls(self.channel, topic, **kwargs)
|
||||
publisher.send(msg)
|
||||
@@ -458,8 +457,6 @@ class Connection(object):
|
||||
LOG.exception(_('Failed to publish message %s' % str(e)))
|
||||
try:
|
||||
self.reconnect()
|
||||
if publisher:
|
||||
publisher.reconnect(self.channel)
|
||||
except self.connection.connection_errors, e:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user