Prevent Messaging to resend failed notifications
Infinite retrying to send notification may cause osprofiler to block, if transport is not configured correctly. So the easiest way to avoid this sort of blocks is to set retry=0 at notifier configuration. Change-Id: I5a4b75905dc8d63b612e193805bae28616e425a7
This commit is contained in:
parent
2a0300dc07
commit
dbe49d142b
@ -29,7 +29,8 @@ class Messaging(base.Notifier):
|
||||
self.service = service
|
||||
|
||||
self.notifier = messaging.Notifier(
|
||||
transport, publisher_id=host, driver="messaging", topic="profiler")
|
||||
transport, publisher_id=host, driver="messaging",
|
||||
topic="profiler", retry=0)
|
||||
|
||||
def notify(self, info, context=None):
|
||||
"""Send notifications to Ceilometer via oslo.messaging notifier API.
|
||||
|
@ -34,7 +34,8 @@ class MessagingTestCase(test.TestCase):
|
||||
transport, project, service, host)
|
||||
|
||||
messaging.Notifier.assert_called_once_with(
|
||||
transport, publisher_id=host, driver="messaging", topic="profiler")
|
||||
transport, publisher_id=host, driver="messaging",
|
||||
topic="profiler", retry=0)
|
||||
|
||||
info = {
|
||||
"a": 10
|
||||
|
Loading…
Reference in New Issue
Block a user