Send a notification per sample, do not batch

This adjust the pollster with no pipeline transforms such that it
sends each sample as a single notification.

The sample is still in a list, but it is a list of length one.

Change-Id: Ia19a614500a70ea0de4b31e3a91dae7c10a12c68
This commit is contained in:
Chris Dent 2015-07-20 18:26:14 +00:00
parent 5b9e5d8e7a
commit 9d2399125c

View File

@ -172,18 +172,16 @@ class PollingTask(object):
cache=cache,
resources=polling_resources
)
sample_messages = []
for sample in samples:
sample_dict = (
publisher_utils.meter_message_from_counter(
sample, cfg.CONF.publisher.telemetry_secret
))
sample_messages.append(sample_dict)
self.manager.notifier.info(
self.manager.context.to_dict(),
'telemetry.api',
sample_messages
)
self.manager.notifier.info(
self.manager.context.to_dict(),
'telemetry.api',
[sample_dict]
)
except plugin_base.PollsterPermanentError as err:
LOG.error(_(
'Prevent pollster %(name)s for '