Method: Sequent::Core::SnapshotStore#select_aggregates_for_snapshotting

Defined in:
lib/sequent/core/snapshot_store.rb

#select_aggregates_for_snapshotting(limit:, reschedule_snapshots_scheduled_before: nil) ⇒ Object



95
96
97
98
99
100
101
102
# File 'lib/sequent/core/snapshot_store.rb', line 95

def select_aggregates_for_snapshotting(limit:, reschedule_snapshots_scheduled_before: nil)
  query_function(
    connection,
    'select_aggregates_for_snapshotting',
    [limit, reschedule_snapshots_scheduled_before, Time.now],
    columns: ['aggregate_id'],
  ).pluck('aggregate_id')
end