aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mix/tasks/pleroma/email.ex7
-rw-r--r--lib/mix/tasks/pleroma/user.ex4
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/mix/tasks/pleroma/email.ex b/lib/mix/tasks/pleroma/email.ex
index c0bef0386..1f543241a 100644
--- a/lib/mix/tasks/pleroma/email.ex
+++ b/lib/mix/tasks/pleroma/email.ex
@@ -31,11 +31,8 @@ defmodule Mix.Tasks.Pleroma.Email do
confirmation_pending: true,
invisible: false
})
- |> Pleroma.RepoStreamer.chunk_stream(500)
- |> Stream.each(fn users ->
- users
- |> Enum.each(fn user -> Pleroma.User.try_send_confirmation_email(user) end)
- end)
+ |> Pleroma.Repo.chunk_stream(500, :batches)
+ |> Stream.each(&Pleroma.User.try_send_confirmation_email(&1))
|> Stream.run()
end
end
diff --git a/lib/mix/tasks/pleroma/user.ex b/lib/mix/tasks/pleroma/user.ex
index 8196e34b1..d50205600 100644
--- a/lib/mix/tasks/pleroma/user.ex
+++ b/lib/mix/tasks/pleroma/user.ex
@@ -370,7 +370,7 @@ defmodule Mix.Tasks.Pleroma.User do
is_admin: false,
invisible: false
})
- |> Pleroma.RepoStreamer.chunk_stream(500)
+ |> Pleroma.Repo.chunk_stream(500, :batches)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, false) end)
@@ -388,7 +388,7 @@ defmodule Mix.Tasks.Pleroma.User do
is_admin: false,
invisible: false
})
- |> Pleroma.RepoStreamer.chunk_stream(500)
+ |> Pleroma.Repo.chunk_stream(500, :batches)
|> Stream.each(fn users ->
users
|> Enum.each(fn user -> User.need_confirmation(user, true) end)