From a14489410255d1145ce9dd5148a698541a62740c Mon Sep 17 00:00:00 2001 From: Paul Kim Date: Fri, 28 Jul 2023 10:07:51 -0400 Subject: [PATCH] Remove filtering subway predictions by route (#663) * Remove filtering logic * Remove no longer needed documentation --- lib/signs/realtime.ex | 11 ----------- lib/signs/utilities/source_config.ex | 1 - 2 files changed, 12 deletions(-) diff --git a/lib/signs/realtime.ex b/lib/signs/realtime.ex index d4492f37b..991ca8d4e 100644 --- a/lib/signs/realtime.ex +++ b/lib/signs/realtime.ex @@ -159,17 +159,6 @@ defmodule Signs.Realtime do defp fetch_predictions(%{sources: sources}, state) do Enum.flat_map(sources, fn source -> state.prediction_engine.for_stop(source.stop_id, source.direction_id) - |> Enum.filter(fn prediction -> - if source.routes == nil or prediction.route_id in source.routes do - true - else - Logger.info( - "filter_prediction_by_route sign_id=#{state.id} stop_id=#{source.stop_id} direction_id=#{source.direction_id} route_id=#{prediction.route_id}" - ) - - false - end - end) end) end diff --git a/lib/signs/utilities/source_config.ex b/lib/signs/utilities/source_config.ex index 2f16f344c..1c492d3e7 100644 --- a/lib/signs/utilities/source_config.ex +++ b/lib/signs/utilities/source_config.ex @@ -78,7 +78,6 @@ defmodule Signs.Utilities.SourceConfig do * stop_id: The GTFS stop_id that it uses for prediction data. * routes: A list of routes that are relevant to this sign regarding alerts. - Predictions are also filtered based on this field. * direction_id: 0 or 1, used in tandem with the stop ID for predictions * platform: mostly null, but :ashmont | :braintree for JFK/UMass, where it's used for the "next train to X is approaching, on the Y platform" audio.