class PhobosDBCheckpoint::Event

Public Instance Methods

acknowledge!(ack) click to toggle source
# File lib/phobos_db_checkpoint/event.rb, line 16
def acknowledge!(ack)
  self.entity_id = ack.entity_id
  self.event_time = ack.event_time
  self.event_type = ack.event_type
  self.event_version = ack.event_version
  save!
end
exists?() click to toggle source
# File lib/phobos_db_checkpoint/event.rb, line 12
def exists?
  Event.where(topic: topic, group_id: group_id, checksum: checksum).exists?
end

Private Instance Methods

assign_checksum() click to toggle source
# File lib/phobos_db_checkpoint/event.rb, line 26
def assign_checksum
  self.checksum ||= Digest::MD5.hexdigest(payload.to_json) if payload
end