aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/uploads.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-10 13:03:48 +0000
committerlain <lain@soykaf.club>2019-06-10 13:03:48 +0000
commit8fd68b8039c81a4e7b6dd1232c32fa2e736b1ea2 (patch)
tree1dc9bc9e0e0e0f5ae894a9c75ae3ca45bef49808 /lib/mix/tasks/pleroma/uploads.ex
parent3d7bb4712436ca80b840b35c39674e2f951cecbe (diff)
parentdbe4c2b7c8cfec4d8348de869a86c03015a7b7c5 (diff)
downloadpleroma-8fd68b8039c81a4e7b6dd1232c32fa2e736b1ea2.tar.gz
Merge branch 'feature/releases' into 'develop'
Releases See merge request pleroma/pleroma!1261
Diffstat (limited to 'lib/mix/tasks/pleroma/uploads.ex')
-rw-r--r--lib/mix/tasks/pleroma/uploads.ex12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/mix/tasks/pleroma/uploads.ex b/lib/mix/tasks/pleroma/uploads.ex
index 106fcf443..8855b5538 100644
--- a/lib/mix/tasks/pleroma/uploads.ex
+++ b/lib/mix/tasks/pleroma/uploads.ex
@@ -38,10 +38,10 @@ defmodule Mix.Tasks.Pleroma.Uploads do
Pleroma.Config.put([Upload, :uploader], uploader)
end
- Mix.shell().info("Migrating files from local #{local_path} to #{to_string(uploader)}")
+ Common.shell_info("Migrating files from local #{local_path} to #{to_string(uploader)}")
if delete? do
- Mix.shell().info(
+ Common.shell_info(
"Attention: uploaded files will be deleted, hope you have backups! (--delete ; cancel with ^C)"
)
@@ -78,7 +78,7 @@ defmodule Mix.Tasks.Pleroma.Uploads do
|> Enum.filter(& &1)
total_count = length(uploads)
- Mix.shell().info("Found #{total_count} uploads")
+ Common.shell_info("Found #{total_count} uploads")
uploads
|> Task.async_stream(
@@ -90,7 +90,7 @@ defmodule Mix.Tasks.Pleroma.Uploads do
:ok
error ->
- Mix.shell().error("failed to upload #{inspect(upload.path)}: #{inspect(error)}")
+ Common.shell_error("failed to upload #{inspect(upload.path)}: #{inspect(error)}")
end
end,
timeout: 150_000
@@ -99,10 +99,10 @@ defmodule Mix.Tasks.Pleroma.Uploads do
# credo:disable-for-next-line Credo.Check.Warning.UnusedEnumOperation
|> Enum.reduce(0, fn done, count ->
count = count + length(done)
- Mix.shell().info("Uploaded #{count}/#{total_count} files")
+ Common.shell_info("Uploaded #{count}/#{total_count} files")
count
end)
- Mix.shell().info("Done!")
+ Common.shell_info("Done!")
end
end