diff options
author | Cerberus <matt.dietz@rackspace.com> | 2011-02-16 13:49:54 -0600 |
---|---|---|
committer | Cerberus <matt.dietz@rackspace.com> | 2011-02-16 13:49:54 -0600 |
commit | d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933 (patch) | |
tree | fd030094eb5a120c94a95befab07befc69dc6dbc /nova/rpc.py | |
parent | 879845496a50477ebc2709291c159ae1e8d5aa2a (diff) | |
parent | 61963f00ad70e73a06ffb35f3fd4b08696e39502 (diff) | |
download | nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.tar.gz nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.tar.xz nova-d6c8fbe761a0c0558bb9c9635d7fdab8a99e3933.zip |
Merge from trunk
Diffstat (limited to 'nova/rpc.py')
-rw-r--r-- | nova/rpc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/rpc.py b/nova/rpc.py index 9998bb891..292fbaaf2 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -46,7 +46,7 @@ LOG = logging.getLogger('nova.rpc') class Connection(carrot_connection.BrokerConnection): """Connection instance object""" @classmethod - def instance(cls, new=False): + def instance(cls, new=True): """Returns the instance""" if new or not hasattr(cls, '_instance'): params = dict(hostname=FLAGS.rabbit_host, @@ -246,7 +246,7 @@ def msg_reply(msg_id, reply=None, failure=None): LOG.error(_("Returning exception %s to caller"), message) LOG.error(tb) failure = (failure[0].__name__, str(failure[1]), tb) - conn = Connection.instance(True) + conn = Connection.instance() publisher = DirectPublisher(connection=conn, msg_id=msg_id) try: publisher.send({'result': reply, 'failure': failure}) @@ -319,7 +319,7 @@ def call(context, topic, msg): self.result = data['result'] wait_msg = WaitMessage() - conn = Connection.instance(True) + conn = Connection.instance() consumer = DirectConsumer(connection=conn, msg_id=msg_id) consumer.register_callback(wait_msg) @@ -346,7 +346,7 @@ def cast(context, topic, msg): """Sends a message on a topic without waiting for a response""" LOG.debug(_("Making asynchronous cast...")) _pack_context(msg, context) - conn = Connection.instance(True) + conn = Connection.instance() publisher = TopicPublisher(connection=conn, topic=topic) publisher.send(msg) publisher.close() |