Skip to content

Commit

Permalink
Remove filtering subway predictions by route (#663)
Browse files Browse the repository at this point in the history
* Remove filtering logic

* Remove no longer needed documentation
  • Loading branch information
PaulJKim authored Jul 28, 2023
1 parent be77d8c commit a144894
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions lib/signs/realtime.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion lib/signs/utilities/source_config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a144894

Please sign in to comment.