diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-05-27 16:31:37 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-05-27 16:31:37 -0500 |
commit | 0d57e066260234fb582a63870cbae7517e7b6246 (patch) | |
tree | e791d26512aadc6ff4d99daaa055332cc967669a /lib | |
parent | 73ca57e4f1620ddaf167c368f48a0096b2096a96 (diff) | |
download | pleroma-0d57e066260234fb582a63870cbae7517e7b6246.tar.gz |
Make clearer that this is time and resource consuming
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mix/tasks/pleroma/database.ex | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index 1fdafcc88..2f1f33469 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -34,7 +34,11 @@ defmodule Mix.Tasks.Pleroma.Database do ) if Keyword.get(options, :vacuum) do - Logger.info("Runnning VACUUM FULL. This could take a while.") + Logger.info("Runnning VACUUM FULL.") + + Logger.warn( + "Re-packing your entire database may take a while and will consume extra disk space during the process." + ) Repo.query!( "vacuum full;", @@ -94,7 +98,11 @@ defmodule Mix.Tasks.Pleroma.Database do |> Repo.delete_all(timeout: :infinity) if Keyword.get(options, :vacuum) do - Logger.info("Runnning VACUUM FULL. This could take a while.") + Logger.info("Runnning VACUUM FULL.") + + Logger.warn( + "Re-packing your entire database may take a while and will consume extra disk space during the process." + ) Repo.query!( "vacuum full;", @@ -142,6 +150,7 @@ defmodule Mix.Tasks.Pleroma.Database do case args do "analyze" -> Logger.info("Runnning VACUUM ANALYZE.") + Repo.query!( "vacuum analyze;", [], @@ -149,7 +158,11 @@ defmodule Mix.Tasks.Pleroma.Database do ) "full" -> - Logger.info("Runnning VACUUM FULL. This could take a while.") + Logger.info("Runnning VACUUM FULL.") + + Logger.warn( + "Re-packing your entire database may take a while and will consume extra disk space during the process." + ) Repo.query!( "vacuum full;", |