Class: Webhookdb::Jobs::MessageDispatched

Inherits:
Object
  • Object
show all
Extended by:
Async::Job
Defined in:
lib/webhookdb/jobs/message_dispatched.rb

Instance Method Summary collapse

Methods included from Async::Job

extended

Instance Method Details

#_perform(event) ⇒ Object



10
11
12
13
14
15
# File 'lib/webhookdb/jobs/message_dispatched.rb', line 10

def _perform(event)
  delivery = self.lookup_model(Webhookdb::Message::Delivery, event)
  Webhookdb::Idempotency.once_ever.under_key("message-dispatched-#{delivery.id}") do
    delivery.send!
  end
end