Make clearer that this is time and resource consuming

This commit is contained in:
Mark Felder 2020-05-27 16:31:37 -05:00
parent 73ca57e4f1
commit 0d57e06626

View file

@ -34,7 +34,11 @@ def run(["remove_embedded_objects" | args]) do
) )
if Keyword.get(options, :vacuum) 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!( Repo.query!(
"vacuum full;", "vacuum full;",
@ -94,7 +98,11 @@ def run(["prune_objects" | args]) do
|> Repo.delete_all(timeout: :infinity) |> Repo.delete_all(timeout: :infinity)
if Keyword.get(options, :vacuum) 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!( Repo.query!(
"vacuum full;", "vacuum full;",
@ -142,6 +150,7 @@ def run(["vacuum", args]) do
case args do case args do
"analyze" -> "analyze" ->
Logger.info("Runnning VACUUM ANALYZE.") Logger.info("Runnning VACUUM ANALYZE.")
Repo.query!( Repo.query!(
"vacuum analyze;", "vacuum analyze;",
[], [],
@ -149,7 +158,11 @@ def run(["vacuum", args]) do
) )
"full" -> "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!( Repo.query!(
"vacuum full;", "vacuum full;",