summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2012-01-04 16:17:33 -0800
committerChris Behrens <cbehrens@codestud.com>2012-01-04 16:17:33 -0800
commit7edbac2015c5de129aa87f72ff0dad91342655ba (patch)
treed526a9f7c9bae513ef39e627d48e82916496506f
parent988743216a688fc8db6c17e80df05ef0674ed7f1 (diff)
downloadnova-7edbac2015c5de129aa87f72ff0dad91342655ba.tar.gz
nova-7edbac2015c5de129aa87f72ff0dad91342655ba.tar.xz
nova-7edbac2015c5de129aa87f72ff0dad91342655ba.zip
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
-rw-r--r--nova/rpc/impl_kombu.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py
index 5f47737d0..82eb651de 100644
--- a/nova/rpc/impl_kombu.py
+++ b/nova/rpc/impl_kombu.py
@@ -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