lib/tobox/plugins/event_grouping.rb in tobox-0.5.1 vs lib/tobox/plugins/event_grouping.rb in tobox-0.5.2

- old
+ new

@@ -14,11 +14,11 @@ @group_column = configuration[:group_column] end private - def fetch_event_id + def fetch_event_ids group = @pick_next_sql.for_update .skip_locked .limit(1) .select(@group_column) @@ -34,11 +34,11 @@ # or when new rows from a given group have been inserted after the lock has been # acquired event_ids = [] end - # lock all, process 1 - event_ids.first + # lock all + event_ids.first(@batch_size) end end end register_plugin :event_grouping, EventGrouping