diff options
Diffstat (limited to 'openstack/common/rpc/service.py')
-rw-r--r-- | openstack/common/rpc/service.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/openstack/common/rpc/service.py b/openstack/common/rpc/service.py index 0c0255c..e572956 100644 --- a/openstack/common/rpc/service.py +++ b/openstack/common/rpc/service.py @@ -20,6 +20,7 @@ from openstack.common.gettextutils import _ from openstack.common import log as logging from openstack.common import rpc +from openstack.common.rpc import dispatcher as rpc_dispatcher from openstack.common import service @@ -46,15 +47,15 @@ class Service(service.Service): LOG.debug(_("Creating Consumer connection for Service %s") % self.topic) - rpc_dispatcher = rpc.dispatcher.RpcDispatcher([self.manager]) + dispatcher = rpc_dispatcher.RpcDispatcher([self.manager]) # Share this same connection for these Consumers - self.conn.create_consumer(self.topic, rpc_dispatcher, fanout=False) + self.conn.create_consumer(self.topic, dispatcher, fanout=False) node_topic = '%s.%s' % (self.topic, self.host) - self.conn.create_consumer(node_topic, rpc_dispatcher, fanout=False) + self.conn.create_consumer(node_topic, dispatcher, fanout=False) - self.conn.create_consumer(self.topic, rpc_dispatcher, fanout=True) + self.conn.create_consumer(self.topic, dispatcher, fanout=True) # Consume from all consumers in a thread self.conn.consume_in_thread() |