Class: Fuik::WebhookProcessingJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/fuik/webhook_processing_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(event_class_name, webhook_event) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/jobs/fuik/webhook_processing_job.rb', line 7

def perform(event_class_name, webhook_event)
  Object.const_get(event_class_name).new(webhook_event).process!
rescue => error
  webhook_event.failed!(error)

  Notifications.failed(
    webhook_event: webhook_event,
    event_class: event_class_name,
    error: error
  )

  raise
end