Beispiel #1
0
 def consume_message(self, vumi_message):
     msg = MetricMessage.from_dict(vumi_message.payload)
     for metric_name, aggregators, values in msg.datapoints():
         self.callback(metric_name, aggregators, values)
Beispiel #2
0
 def recv_datapoints(self, exchange, queue):
     """Retrieve datapoints from a broker."""
     vumi_msgs = self._broker.get_messages(exchange, queue)
     msgs = [MetricMessage.from_dict(vm.payload) for vm in vumi_msgs]
     return [msg.datapoints() for msg in msgs]
Beispiel #3
0
 def recv_datapoints(self, exchange, queue):
     """Retrieve datapoints from a broker."""
     contents = self._broker.get_dispatched(exchange, queue)
     vumi_msgs = [Message.from_json(content.body) for content in contents]
     msgs = [MetricMessage.from_dict(vm.payload) for vm in vumi_msgs]
     return [msg.datapoints() for msg in msgs]
Beispiel #4
0
 def consume_message(self, vumi_message):
     msg = MetricMessage.from_dict(vumi_message.payload)
     for metric_name, aggregators, values in msg.datapoints():
         self.callback(metric_name, aggregators, values)
Beispiel #5
0
 def recv_datapoints(self, exchange, queue):
     """Retrieve datapoints from a broker."""
     vumi_msgs = self._broker.get_messages(exchange, queue)
     msgs = [MetricMessage.from_dict(vm.payload) for vm in vumi_msgs]
     return [msg.datapoints() for msg in msgs]