| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import logging | 5 import logging |
| 6 | 6 |
| 7 from google.protobuf.message import DecodeError | 7 from google.protobuf.message import DecodeError |
| 8 from infra_libs.event_mon.protos.chrome_infra_log_pb2 import ( | 8 from infra_libs.event_mon.protos.chrome_infra_log_pb2 import ( |
| 9 ChromeInfraEvent, ServiceEvent, BuildEvent) | 9 ChromeInfraEvent, ServiceEvent, BuildEvent) |
| 10 from infra_libs.event_mon.protos.goma_stats_pb2 import GomaStats | 10 from infra_libs.event_mon.protos.goma_stats_pb2 import GomaStats |
| 11 from infra_libs.event_mon.protos.log_request_lite_pb2 import LogRequestLite | 11 from infra_libs.event_mon.protos.log_request_lite_pb2 import LogRequestLite |
| 12 from infra_libs.event_mon import config, router | 12 from infra_libs.event_mon import config, router |
| 13 | 13 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 def send_events(events): | 484 def send_events(events): |
| 485 """Send several events at once to the endpoint. | 485 """Send several events at once to the endpoint. |
| 486 | 486 |
| 487 Args: | 487 Args: |
| 488 events (iterable of Event): events to send | 488 events (iterable of Event): events to send |
| 489 | 489 |
| 490 Return: | 490 Return: |
| 491 success (bool): True if data was successfully received by the endpoint. | 491 success (bool): True if data was successfully received by the endpoint. |
| 492 """ | 492 """ |
| 493 return config._router.push_event(tuple(e.log_event() for e in events)) | 493 return config._router.push_event(tuple(e.log_event() for e in events)) |
| OLD | NEW |