aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-09-18 22:33:12 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-10-07 18:35:26 +0400
commite50314d9d342dbf9a03ca484654b07717592d4bd (patch)
treed8a020e00cf5b46de8af954b39f1edba23ce6f53
parent563801716a0aa54e30f680b4e985d4b8c79578fb (diff)
downloadpleroma-e50314d9d342dbf9a03ca484654b07717592d4bd.tar.gz
Fix export
-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)