Stream 50 rows at a time for batch operations

This commit is contained in:
Claudio Ortolina
2024-11-29 10:00:18 +00:00
parent df9d18a21f
commit 010c769b55
+1 -1
View File
@@ -54,7 +54,7 @@ defmodule MusicLibrary.Records.Batch do
defp run_on_all_records(fun) do
q = from(r in Record)
stream = Repo.stream(q)
stream = Repo.stream(q, max_rows: 50)
Repo.transaction(
fn ->