Skip to content

Commit

Permalink
fix slack reminder errors when running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
panentheos committed May 2, 2024
1 parent 23a97fd commit d7a6009
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/screenplay/outfront_takeover_tool/alerts/reminders.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ defmodule Screenplay.OutfrontTakeoverTool.Alerts.Reminders do
end

def handle_info(:work, state) do
url = Application.get_env(:screenplay, :slack_webhook_url, "")

schedule_work()

if url == "" do
Logger.info("No Slack Webhook URL found")
else
send_slack_messages_for_outdated_alerts(url)
case Application.get_env(:screenplay, :slack_webhook_url) do
v when v in [nil, ""] -> Logger.info("No Slack Webhook URL found")
url -> send_slack_messages_for_outdated_alerts(url)
end

{:noreply, state}
Expand Down

0 comments on commit d7a6009

Please sign in to comment.