Sha256: 4acc6dcde5449151cc543f8f01641fc09b10d2b49c875ca56f02668b704d2aa3
Contents?: true
Size: 720 Bytes
Versions: 19
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true module ForemanWebhooks class DeliverWebhookJob < ::ApplicationJob queue_as :default def perform(options) webhook = Webhook.unscoped.find_by(id: options[:webhook_id]) WebhookService.new( webhook: webhook, headers: options[:headers], url: options[:url], event_name: options[:event_name], payload: options[:payload] ).execute end def webhook_id arguments.first['webhook_id'] unless arguments.first.nil? end def humanized_name webhook = webhook_id && Webhook.unscoped.find_by(id: webhook_id) (webhook && (_('Deliver webhook %s') % webhook.name)) || _('Deliver webhook') end end end
Version data entries
19 entries across 19 versions & 1 rubygems