class RubyEventStore::Outbox::Repository::Record

Public Class Methods

for_fetch_specification(fetch_specification) click to toggle source
# File lib/ruby_event_store/outbox/repository.rb, line 19
def self.for_fetch_specification(fetch_specification)
  where(format: fetch_specification.message_format, split_key: fetch_specification.split_key)
end
remaining_for(fetch_specification) click to toggle source
# File lib/ruby_event_store/outbox/repository.rb, line 15
def self.remaining_for(fetch_specification)
  where(format: fetch_specification.message_format, split_key: fetch_specification.split_key, enqueued_at: nil)
end

Public Instance Methods

enqueued?() click to toggle source
# File lib/ruby_event_store/outbox/repository.rb, line 27
def enqueued?
  !enqueued_at.nil?
end
hash_payload() click to toggle source
# File lib/ruby_event_store/outbox/repository.rb, line 23
def hash_payload
  JSON.parse(payload).deep_symbolize_keys
end