class Sequent::Core::AggregateSnapshotter
Public Instance Methods
Source
# File lib/sequent/core/aggregate_snapshotter.rb, line 39 def take_snapshot(aggregate_id) aggregate = repository.load_aggregate(aggregate_id) Sequent.logger.info "Taking snapshot for aggregate #{aggregate}" aggregate.take_snapshot rescue StandardError => e Sequent.logger.error("Failed to take snapshot for aggregate #{aggregate_id}: #{e}, #{e.inspect}") nil end