logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: e50314d9d342dbf9a03ca484654b07717592d4bd
parent 563801716a0aa54e30f680b4e985d4b8c79578fb
Author: Egor Kislitsyn <egor@kislitsyn.com>
Date:   Fri, 18 Sep 2020 22:33:12 +0400

Fix export

Diffstat:

Mlib/pleroma/backup.ex15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git 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)