File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/error_tracker/plugins Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ defmodule ErrorTracker.Plugins.Pruner do
89
89
_pruned_occurrences_count =
90
90
errors
91
91
|> Ecto . assoc ( :occurrences )
92
- |> limit ( 1000 )
93
92
|> prune_occurrences ( )
94
93
|> Enum . sum ( )
95
94
@@ -101,7 +100,8 @@ defmodule ErrorTracker.Plugins.Pruner do
101
100
102
101
defp prune_occurrences ( occurrences_query ) do
103
102
Stream . unfold ( occurrences_query , fn occurrences_query ->
104
- occurrences_ids = Repo . all ( from occurrence in occurrences_query , select: occurrence . id )
103
+ occurrences_ids =
104
+ Repo . all ( from occurrence in occurrences_query , select: occurrence . id , limit: 1000 )
105
105
106
106
case Repo . delete_all ( from o in Occurrence , where: o . id in ^ occurrences_ids ) do
107
107
{ 0 , _ } -> nil
You can’t perform that action at this time.
0 commit comments