Skip to content

Commit

Permalink
credo.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Dec 13, 2023
1 parent dc64f47 commit 484ac45
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/screenplay/outfront_takeover_tool/alerts/reminders.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,21 @@ defmodule Screenplay.OutfrontTakeoverTool.Alerts.Reminders do
Logger.debug("No outdated alerts found")

alerts ->
Enum.each(alerts, fn %Alert{stations: stations} ->
stations
|> format_slack_message()
|> send_slack_message(url)
end)
send_reminders_for_alerts(alerts, url)
end
end

{:noreply, state}
end

defp send_reminders_for_alerts(alerts, url) do
Enum.each(alerts, fn %Alert{stations: stations} ->
stations
|> format_slack_message()
|> send_slack_message(url)
end)
end

defp format_slack_message(stations) do
group_id = Application.get_env(:screenplay, :pio_slack_group_id)

Expand Down

0 comments on commit 484ac45

Please sign in to comment.