Class: ForemanWebhooks::EventSubscriber

Inherits:
Foreman::BaseSubscriber
  • Object
show all
Defined in:
app/subscribers/foreman_webhooks/event_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



5
6
7
8
9
# File 'app/subscribers/foreman_webhooks/event_subscriber.rb', line 5

def call(event)
  ::Webhook.deliver(event_name: event.name, payload: event.payload)
rescue ::Foreman::Exception => e
  Rails.logger.error e.message
end