diff options
author | Cerberus <matt.dietz@rackspace.com> | 2011-01-28 15:39:08 -0600 |
---|---|---|
committer | Cerberus <matt.dietz@rackspace.com> | 2011-01-28 15:39:08 -0600 |
commit | a83c914a563f284672514118ef02c41e60f0025a (patch) | |
tree | 0f85942632f77cf73ae34c2cff12ef523adcc3a2 /nova/rpc.py | |
parent | 6b0601c12927bc72fb0cba3f88d8f99bee5e63e2 (diff) | |
parent | 396b02f876030f1f54b7af32cf94fccbbe1fe46b (diff) | |
download | nova-a83c914a563f284672514118ef02c41e60f0025a.tar.gz nova-a83c914a563f284672514118ef02c41e60f0025a.tar.xz nova-a83c914a563f284672514118ef02c41e60f0025a.zip |
Merge from trunk
Diffstat (limited to 'nova/rpc.py')
-rw-r--r-- | nova/rpc.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/nova/rpc.py b/nova/rpc.py index bbfa71138..01fc6d44b 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -89,15 +89,16 @@ class Consumer(messaging.Consumer): self.failed_connection = False break except: # Catching all because carrot sucks - LOG.exception(_("AMQP server on %s:%d is unreachable." - " Trying again in %d seconds.") % ( - FLAGS.rabbit_host, - FLAGS.rabbit_port, - FLAGS.rabbit_retry_interval)) + fl_host = FLAGS.rabbit_host + fl_port = FLAGS.rabbit_port + fl_intv = FLAGS.rabbit_retry_interval + LOG.exception(_("AMQP server on %(fl_host)s:%(fl_port)d is" + " unreachable. Trying again in %(fl_intv)d seconds.") + % locals()) self.failed_connection = True if self.failed_connection: LOG.exception(_("Unable to connect to AMQP server " - "after %d tries. Shutting down."), + "after %d tries. Shutting down."), FLAGS.rabbit_max_retries) sys.exit(1) @@ -152,7 +153,7 @@ class TopicConsumer(Consumer): class AdapterConsumer(TopicConsumer): """Calls methods on a proxy object based on method and args""" def __init__(self, connection=None, topic="broadcast", proxy=None): - LOG.debug(_('Initing the Adapter Consumer for %s') % (topic)) + LOG.debug(_('Initing the Adapter Consumer for %s') % topic) self.proxy = proxy super(AdapterConsumer, self).__init__(connection=connection, topic=topic) @@ -167,7 +168,7 @@ class AdapterConsumer(TopicConsumer): Example: {'method': 'echo', 'args': {'value': 42}} """ - LOG.debug(_('received %s') % (message_data)) + LOG.debug(_('received %s') % message_data) msg_id = message_data.pop('_msg_id', None) ctxt = _unpack_context(message_data) @@ -180,7 +181,7 @@ class AdapterConsumer(TopicConsumer): # messages stay in the queue indefinitely, so for now # we just log the message and send an error string # back to the caller - LOG.warn(_('no method for message: %s') % (message_data)) + LOG.warn(_('no method for message: %s') % message_data) msg_reply(msg_id, _('No method for message: %s') % message_data) return |