Class: RubyEventStore::Outbox::Repository::Record
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- RubyEventStore::Outbox::Repository::Record
- Defined in:
- lib/ruby_event_store/outbox/repository.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.for_fetch_specification(fetch_specification) ⇒ Object
19 20 21 |
# File 'lib/ruby_event_store/outbox/repository.rb', line 19 def self.for_fetch_specification(fetch_specification) where(format: fetch_specification., split_key: fetch_specification.split_key) end |
.remaining_for(fetch_specification) ⇒ Object
15 16 17 |
# File 'lib/ruby_event_store/outbox/repository.rb', line 15 def self.remaining_for(fetch_specification) where(format: fetch_specification., split_key: fetch_specification.split_key, enqueued_at: nil) end |
Instance Method Details
#enqueued? ⇒ Boolean
27 28 29 |
# File 'lib/ruby_event_store/outbox/repository.rb', line 27 def enqueued? !enqueued_at.nil? end |
#hash_payload ⇒ Object
23 24 25 |
# File 'lib/ruby_event_store/outbox/repository.rb', line 23 def hash_payload JSON.parse(payload).deep_symbolize_keys end |