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

- old
+ new

@@ -14,11 +14,11 @@ @group_column = configuration[:group_column] end private - def fetch_event_ids + def fetch_event_id group = @pick_next_sql.for_update .skip_locked .limit(1) .select(@group_column) @@ -35,10 +35,10 @@ # acquired event_ids = [] end # lock all, process 1 - event_ids[0, 1] + event_ids.first end end end register_plugin :event_grouping, EventGrouping