From 9138ba24b88b29b05236075f24cf6099aff68335 Mon Sep 17 00:00:00 2001 From: Zhao Lei Date: Thu, 24 Sep 2015 17:31:53 +0800 Subject: [PATCH] Fix spelling typo in output abandonning -> abandoning for output of oslo_messaging/_drivers/impl_rabbit.py Plus some small fix for source comments/config help. Change-Id: Ia4bd1465cbe8beef8e109d20e5ddbec12d6d8e8f Signed-off-by: Zhao Lei --- etc/routing_notifier.yaml.sample | 2 +- oslo_messaging/_drivers/impl_rabbit.py | 8 ++++---- oslo_messaging/_drivers/impl_zmq.py | 2 +- oslo_messaging/_utils.py | 2 +- oslo_messaging/tests/drivers/test_impl_rabbit.py | 4 ++-- oslo_messaging/tests/rpc/test_server.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/etc/routing_notifier.yaml.sample b/etc/routing_notifier.yaml.sample index 26fb7310a..47af4b90e 100644 --- a/etc/routing_notifier.yaml.sample +++ b/etc/routing_notifier.yaml.sample @@ -3,7 +3,7 @@ # However, defining different sets for the same driver allows you # to do OR operations. # -# See how this logic is modeled below: +# See how this logic is modelled below: # # if (priority in info, warn or error) or # (event == compute.scheduler.run_instance) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index aa7cffa7d..59029d7c4 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -479,7 +479,7 @@ class Connection(object): # seconds, but we use a lock around the kombu connection # so, to not lock to much this lock to most of the time do nothing # expected waiting the events drain, we start heartbeat_check and - # retreive the server heartbeat packet only two times more than + # retrieve the server heartbeat packet only two times more than # the minimum required for the heartbeat works # (heatbeat_timeout/heartbeat_rate/2.0, default kombu # heartbeat_rate is 2) @@ -501,7 +501,7 @@ class Connection(object): LOG.info(_LI('Connected to AMQP server on %(hostname)s:%(port)s'), self.connection.info()) - # NOTE(sileht): value choosen according the best practice from kombu + # NOTE(sileht): value chosen according the best practice from kombu # http://kombu.readthedocs.org/en/latest/reference/kombu.common.html#kombu.common.eventloop # For heatbeat, we can set a bigger timeout, and check we receive the # heartbeat packets regulary @@ -864,7 +864,7 @@ class Connection(object): exc) def _consume(): - # NOTE(sileht): in case the acknowledgement or requeue of a + # NOTE(sileht): in case the acknowledgment or requeue of a # message fail, the kombu transport can be disconnected # In this case, we must redeclare our consumers, so raise # a recoverable error to trigger the reconnection code. @@ -1085,7 +1085,7 @@ class Connection(object): elif exc.code == 404: msg = _("The exchange %(exchange)s to send to " "%(routing_key)s still doesn't exist after " - "%(duration)s sec abandonning...") % { + "%(duration)s sec abandoning...") % { 'duration': duration, 'exchange': exchange.name, 'routing_key': routing_key} diff --git a/oslo_messaging/_drivers/impl_zmq.py b/oslo_messaging/_drivers/impl_zmq.py index e39b7cfba..d30dc283c 100644 --- a/oslo_messaging/_drivers/impl_zmq.py +++ b/oslo_messaging/_drivers/impl_zmq.py @@ -127,7 +127,7 @@ class ZmqDriver(base.BaseDriver): allowed_remote_exmods=None): """Construct ZeroMQ driver. - Intialize driver options. + Initialize driver options. Construct matchmaker - pluggable interface to targets management Name Service diff --git a/oslo_messaging/_utils.py b/oslo_messaging/_utils.py index 1c816de54..0f600f0ae 100644 --- a/oslo_messaging/_utils.py +++ b/oslo_messaging/_utils.py @@ -87,7 +87,7 @@ class DispatcherExecutorContext(object): def done(self): """Callback after the incoming message have been dispathed - Should be runned in the main executor thread/greenlet/corotine + Should be ran in the main executor thread/greenlet/corotine """ # FIXME(sileht): this is not currently true, this works only because # the driver connection used for polling write on the wire only to diff --git a/oslo_messaging/tests/drivers/test_impl_rabbit.py b/oslo_messaging/tests/drivers/test_impl_rabbit.py index d1e929b52..915715450 100644 --- a/oslo_messaging/tests/drivers/test_impl_rabbit.py +++ b/oslo_messaging/tests/drivers/test_impl_rabbit.py @@ -222,7 +222,7 @@ class TestRabbitPublisher(test_utils.BaseTestCase): try_send(e_passive) with mock.patch('kombu.messaging.Producer', side_effect=exc): - # Shoud reset the cache and ensures the exchange does + # Should reset the cache and ensures the exchange does # not exists self.assertRaises(exc, try_send, e_passive) # Recreate it @@ -473,7 +473,7 @@ class TestSendReceive(test_utils.BaseTestCase): if self.reply_failure_404: # NOTE(sileht) all reply fail, first take # kombu_reconnect_timeout seconds to fail - # next immediatly fail + # next immediately fail dt = time.time() - start timeout = self.conf.oslo_messaging_rabbit.kombu_reconnect_timeout self.assertTrue(timeout <= dt < (timeout + 0.100), dt) diff --git a/oslo_messaging/tests/rpc/test_server.py b/oslo_messaging/tests/rpc/test_server.py index dfa900cdf..c82e2fd28 100644 --- a/oslo_messaging/tests/rpc/test_server.py +++ b/oslo_messaging/tests/rpc/test_server.py @@ -123,7 +123,7 @@ class TestRPCServer(test_utils.BaseTestCase, ServerSetupMixin): # Mocking executor server._executor = mock.Mock() # Here assigning executor's listener object to listener variable - # before calling wait method, beacuse in wait method we are + # before calling wait method, because in wait method we are # setting executor to None. listener = server._executor.listener # call server wait method