Skip to content

Commit

Permalink
Added translation to logger. (#1868)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 authored Sep 18, 2023
1 parent 44c1a8c commit b708768
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/screens/ol_crowding/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule Screens.OlCrowding.Logger do
use GenServer

alias Screens.Predictions.Prediction
alias Screens.Util

def start_link(opts) do
GenServer.start_link(__MODULE__, opts)
Expand Down Expand Up @@ -38,7 +39,13 @@ defmodule Screens.OlCrowding.Logger do

{:ok, predictions} = fetch_predictions_fn.(fetch_params)
next_train_prediction = List.first(predictions)
crowding_levels = Enum.map_join(prediction.vehicle.carriages, ",", & &1.occupancy_status)

crowding_levels =
Enum.map_join(
prediction.vehicle.carriages,
",",
&Util.translate_carriage_occupancy_status(&1.occupancy_status)
)

cond do
# A car's crowding level changed. Log it and shutdown the process.
Expand Down

0 comments on commit b708768

Please sign in to comment.