aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/email.ex
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-23 12:32:47 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-23 12:32:47 -0500
commit8af8eb5ce79a35e01415763164533c537e017776 (patch)
tree4ef722c2573883caae40d7e877ddda88b8a9f20e /lib/mix/tasks/pleroma/email.ex
parentf3a1f9c3bbb7321876a09b3846b5e10ecf4af94f (diff)
downloadpleroma-8af8eb5ce79a35e01415763164533c537e017776.tar.gz
Chase Pleroma.RepoStreamer.chunk_stream -> Pleroma.Repo.chunk_stream
Diffstat (limited to 'lib/mix/tasks/pleroma/email.ex')
-rw-r--r--lib/mix/tasks/pleroma/email.ex7
1 files changed, 2 insertions, 5 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