Skip to content

Commit

Permalink
Temp code for testing job.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaddox5 committed Nov 18, 2024
1 parent 31fc5e0 commit 0831164
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/screenplay/jobs/reminders.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ defmodule Screenplay.Jobs.Reminders do

@impl Oban.Worker
def perform(_) do
case Application.get_env(:screenplay, :slack_webhook_url) do
case Application.get_env(
:screenplay,
:slack_webhook_url,
"https://hooks.slack.com/services/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"
) do
v when v in [nil, ""] -> Logger.info("No Slack Webhook URL found")
url -> send_slack_messages_for_outdated_alerts(url)
end
Expand All @@ -33,10 +37,17 @@ defmodule Screenplay.Jobs.Reminders do
end

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

%{
blocks: [
%{
type: "header",
text: %{
type: "plain_text",
text: "Outfront Takeover Tool Test"
}
},
%{
type: "section",
text: %{
Expand Down

0 comments on commit 0831164

Please sign in to comment.