Remove dead code

This commit is contained in:
Uku Taht 2022-05-27 10:52:58 +03:00
parent 7ab9a43324
commit da93f2aa6e
4 changed files with 0 additions and 35 deletions

View File

@ -18,11 +18,6 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch id: extract_branch
- name: WAT
shell: bash
run: ls $GITHUB_WORKSPACE/priv
id: ls_github_workspace
- name: Prepeare release - name: Prepeare release
shell: bash shell: bash
run: ./rel/prepare_release.sh ${{ steps.extract_branch.outputs.branch }} run: ./rel/prepare_release.sh ${{ steps.extract_branch.outputs.branch }}

View File

@ -103,7 +103,6 @@ paddle_auth_code = get_var_from_path_or_env(config_dir, "PADDLE_VENDOR_AUTH_CODE
paddle_vendor_id = get_var_from_path_or_env(config_dir, "PADDLE_VENDOR_ID") paddle_vendor_id = get_var_from_path_or_env(config_dir, "PADDLE_VENDOR_ID")
google_cid = get_var_from_path_or_env(config_dir, "GOOGLE_CLIENT_ID") google_cid = get_var_from_path_or_env(config_dir, "GOOGLE_CLIENT_ID")
google_secret = get_var_from_path_or_env(config_dir, "GOOGLE_CLIENT_SECRET") google_secret = get_var_from_path_or_env(config_dir, "GOOGLE_CLIENT_SECRET")
slack_hook_url = get_var_from_path_or_env(config_dir, "SLACK_WEBHOOK")
postmark_api_key = get_var_from_path_or_env(config_dir, "POSTMARK_API_KEY") postmark_api_key = get_var_from_path_or_env(config_dir, "POSTMARK_API_KEY")
cron_enabled = cron_enabled =
@ -236,8 +235,6 @@ config :plausible, :google,
client_id: google_cid, client_id: google_cid,
client_secret: google_secret client_secret: google_secret
config :plausible, :slack, webhook: slack_hook_url
config :plausible, Plausible.ClickhouseRepo, config :plausible, Plausible.ClickhouseRepo,
loggers: [Ecto.LogEntry], loggers: [Ecto.LogEntry],
queue_target: 500, queue_target: 500,

View File

@ -1,25 +0,0 @@
defmodule Plausible.Slack do
require Logger
def notify(text) do
Task.start(fn ->
if env() == "prod" && !self_hosted() do
HTTPoison.post!(webhook_url(), Jason.encode!(%{text: text}))
else
Logger.debug(text)
end
end)
end
defp webhook_url() do
Keyword.fetch!(Application.get_env(:plausible, :slack), :webhook)
end
defp env() do
Application.get_env(:plausible, :environment)
end
defp self_hosted() do
Application.get_env(:plausible, :is_selfhost)
end
end

View File

@ -77,8 +77,6 @@ defmodule PlausibleWeb.SiteController do
case Sites.create(user, site_params) do case Sites.create(user, site_params) do
{:ok, %{site: site}} -> {:ok, %{site: site}} ->
Plausible.Slack.notify("#{user.name} created #{site.domain} [email=#{user.email}]")
if is_first_site do if is_first_site do
PlausibleWeb.Email.welcome_email(user) PlausibleWeb.Email.welcome_email(user)
|> Plausible.Mailer.send_email() |> Plausible.Mailer.send_email()