diff options
author | lain <lain@soykaf.club> | 2020-05-30 12:31:12 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-30 12:31:12 +0200 |
commit | 6ff079ca9f1869ecc0789f8d684e8ea2959ccf1e (patch) | |
tree | 512ef8d0f3d1707d5078a04a229ede65175ab879 /lib/mix | |
parent | 8bdf18d7c10f0e740b2f5e0fa5063c522b8b3872 (diff) | |
parent | b004c427a073f0f5f187f5978de416c0fae96ab8 (diff) | |
download | pleroma-6ff079ca9f1869ecc0789f8d684e8ea2959ccf1e.tar.gz |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'lib/mix')
-rw-r--r-- | lib/mix/tasks/pleroma/database.ex | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index 778de162f..82e2abdcb 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -4,6 +4,7 @@ defmodule Mix.Tasks.Pleroma.Database do alias Pleroma.Conversation + alias Pleroma.Maintenance alias Pleroma.Object alias Pleroma.Repo alias Pleroma.User @@ -34,13 +35,7 @@ defmodule Mix.Tasks.Pleroma.Database do ) if Keyword.get(options, :vacuum) do - Logger.info("Runnning VACUUM FULL") - - Repo.query!( - "vacuum full;", - [], - timeout: :infinity - ) + Maintenance.vacuum("full") end end @@ -94,13 +89,7 @@ defmodule Mix.Tasks.Pleroma.Database do |> Repo.delete_all(timeout: :infinity) if Keyword.get(options, :vacuum) do - Logger.info("Runnning VACUUM FULL") - - Repo.query!( - "vacuum full;", - [], - timeout: :infinity - ) + Maintenance.vacuum("full") end end @@ -135,4 +124,10 @@ defmodule Mix.Tasks.Pleroma.Database do end) |> Stream.run() end + + def run(["vacuum", args]) do + start_pleroma() + + Maintenance.vacuum(args) + end end |