aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/backup.ex15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/pleroma/backup.ex b/lib/pleroma/backup.ex
index d589f12f1..242773bdb 100644
--- a/lib/pleroma/backup.ex
+++ b/lib/pleroma/backup.ex
@@ -191,16 +191,13 @@ defmodule Pleroma.Backup do
counter = :counters.new(1, [])
query
- |> Pleroma.RepoStreamer.chunk_stream(100)
- |> Stream.each(fn items ->
- Enum.each(items, fn i ->
- with {:ok, str} <- fun.(i),
- :ok <- IO.write(file, str <> ",\n") do
- :counters.add(counter, 1, 1)
- end
- end)
+ |> Pleroma.Repo.chunk_stream(100)
+ |> Enum.each(fn i ->
+ with {:ok, str} <- fun.(i),
+ :ok <- IO.write(file, str <> ",\n") do
+ :counters.add(counter, 1, 1)
+ end
end)
- |> Stream.run()
total = :counters.get(counter, 1)