Merge "Use list copy for events in nova notifier"

This commit is contained in:
Jenkins 2014-06-12 13:30:08 +00:00 committed by Gerrit Code Review
commit fcdebe6ff0
1 changed files with 4 additions and 5 deletions

View File

@ -211,13 +211,12 @@ class Notifier(object):
port._notify_event = None
def send_events(self):
batched_events = []
for event in range(len(self.pending_events)):
batched_events.append(self.pending_events.pop())
if not batched_events:
if not self.pending_events:
return
batched_events = self.pending_events
self.pending_events = []
LOG.debug(_("Sending events: %s"), batched_events)
try:
response = self.nclient.server_external_events.create(