Class: Outboxable::Worker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
lib/outboxable/worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(outbox_id) ⇒ Object



7
8
9
10
# File 'lib/outboxable/worker.rb', line 7

def perform(outbox_id)
  Outboxable::PublishingManager.publish(resource: Outbox.find(outbox_id)) if Outboxable.configuration.orm == :activerecord
  Outboxable::PublishingManager.publish(resource: Outbox.find_by!(idempotency_key: outbox_id)) if Outboxable.configuration.orm == :mongoid
end