Class: PhobosDBCheckpoint::Event

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
EventHelper
Defined in:
lib/phobos_db_checkpoint/event.rb

Instance Method Summary collapse

Methods included from EventHelper

#configured_handler, #configured_listener, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PhobosDBCheckpoint::EventHelper

Instance Method Details

#acknowledge!(ack) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/phobos_db_checkpoint/event.rb', line 14

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?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/phobos_db_checkpoint/event.rb', line 10

def exists?
  Event.where(topic: topic, group_id: group_id, checksum: checksum).exists?
end