forked from AkkomaGang/akkoma
Chase Pleroma.RepoStreamer.chunk_stream -> Pleroma.Repo.chunk_stream
This commit is contained in:
parent
f3a1f9c3bb
commit
8af8eb5ce7
2 changed files with 4 additions and 7 deletions
|
@ -31,11 +31,8 @@ def run(["resend_confirmation_emails"]) do
|
||||||
confirmation_pending: true,
|
confirmation_pending: true,
|
||||||
invisible: false
|
invisible: false
|
||||||
})
|
})
|
||||||
|> Pleroma.RepoStreamer.chunk_stream(500)
|
|> Pleroma.Repo.chunk_stream(500, :batches)
|
||||||
|> Stream.each(fn users ->
|
|> Stream.each(&Pleroma.User.try_send_confirmation_email(&1))
|
||||||
users
|
|
||||||
|> Enum.each(fn user -> Pleroma.User.try_send_confirmation_email(user) end)
|
|
||||||
end)
|
|
||||||
|> Stream.run()
|
|> Stream.run()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -370,7 +370,7 @@ def run(["confirm_all"]) do
|
||||||
is_admin: false,
|
is_admin: false,
|
||||||
invisible: false
|
invisible: false
|
||||||
})
|
})
|
||||||
|> Pleroma.RepoStreamer.chunk_stream(500)
|
|> Pleroma.Repo.chunk_stream(500, :batches)
|
||||||
|> Stream.each(fn users ->
|
|> Stream.each(fn users ->
|
||||||
users
|
users
|
||||||
|> Enum.each(fn user -> User.need_confirmation(user, false) end)
|
|> Enum.each(fn user -> User.need_confirmation(user, false) end)
|
||||||
|
@ -388,7 +388,7 @@ def run(["unconfirm_all"]) do
|
||||||
is_admin: false,
|
is_admin: false,
|
||||||
invisible: false
|
invisible: false
|
||||||
})
|
})
|
||||||
|> Pleroma.RepoStreamer.chunk_stream(500)
|
|> Pleroma.Repo.chunk_stream(500, :batches)
|
||||||
|> Stream.each(fn users ->
|
|> Stream.each(fn users ->
|
||||||
users
|
users
|
||||||
|> Enum.each(fn user -> User.need_confirmation(user, true) end)
|
|> Enum.each(fn user -> User.need_confirmation(user, true) end)
|
||||||
|
|
Loading…
Reference in a new issue