From 31c95a7025005b5d3cd4b298f3a0586b947e840c Mon Sep 17 00:00:00 2001 From: Aaron Claydon Date: Sat, 9 Nov 2024 10:35:11 +0000 Subject: [PATCH] skip count --- pkg/realtime/vehicletracker/vehicleupdateevent.go | 11 +++++++++++ pkg/stats/calculator/util.go | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/pkg/realtime/vehicletracker/vehicleupdateevent.go b/pkg/realtime/vehicletracker/vehicleupdateevent.go index 921534d..e93959a 100644 --- a/pkg/realtime/vehicletracker/vehicleupdateevent.go +++ b/pkg/realtime/vehicletracker/vehicleupdateevent.go @@ -15,6 +15,7 @@ type VehicleUpdateEvent struct { SourceType string VehicleLocationUpdate *VehicleLocationUpdate + ServiceAlertUpdate *ServiceAlertUpdate DataSource *ctdf.DataSource RecordedAt time.Time @@ -48,3 +49,13 @@ type VehicleLocationEventStopUpdate struct { ArrivalOffset int DepartureOffset int } + +type ServiceAlertUpdate struct { + Type ctdf.ServiceAlertType + + Title string + Description string + + ValidFrom time.Time + ValidUntil time.Time +} diff --git a/pkg/stats/calculator/util.go b/pkg/stats/calculator/util.go index 82a5130..73aae06 100644 --- a/pkg/stats/calculator/util.go +++ b/pkg/stats/calculator/util.go @@ -40,6 +40,10 @@ func CountCountries(datasources map[string]int) map[string]int { datasourceSplit := strings.Split(datasource, "-") country := datasourceSplit[0] + if country == "travigo" { + continue + } + countries[country] += count }