diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-08-13 12:15:34 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-09-24 10:12:06 +0300 |
commit | 9b74780665140d1fccf3d2216cf975404dfac4cc (patch) | |
tree | 5cfbeb939d81dae272c1236d6531162c528b4caa | |
parent | 4db76032c27c975a08e16584bbc703f646e9eda9 (diff) | |
download | pleroma-9b74780665140d1fccf3d2216cf975404dfac4cc.tar.gz |
don't start endpoint in mix tasks
-rw-r--r-- | lib/mix/pleroma.ex | 3 | ||||
-rw-r--r-- | lib/mix/tasks/pleroma/database.ex | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex index 7fa3d6bf6..6c2688b3c 100644 --- a/lib/mix/pleroma.ex +++ b/lib/mix/pleroma.ex @@ -39,8 +39,7 @@ defmodule Mix.Pleroma do Pleroma.Repo, Supervisor.child_spec({Task, &Pleroma.Config.Environment.load_and_update/0}, id: :update_env - ), - Pleroma.Web.Endpoint + ) ] children = diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index a01c36ece..ff47e9813 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -83,7 +83,11 @@ defmodule Mix.Tasks.Pleroma.Database do ), where: o.inserted_at < ^time_deadline, where: - fragment("split_part(?->>'actor', '/', 3) != ?", o.data, ^Pleroma.Web.Endpoint.host()) + fragment( + "split_part(?->>'actor', '/', 3) != ?", + o.data, + ^Pleroma.Config.get([Pleroma.Web.Endpoint, :url, :host]) + ) ) |> Repo.delete_all(timeout: :infinity) |