Skip to content

Configure used ActiveJob - #47

Open
eelcoj wants to merge 1 commit into
mainfrom
activejob-config
Open

Configure used ActiveJob#47
eelcoj wants to merge 1 commit into
mainfrom
activejob-config

Conversation

@eelcoj

@eelcoj eelcoj commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Last release add process later by default (via active job).

This PR add some improvements + option to define your own job class.

# app/jobs/webhook_processing_job.rb
class WebhookProcessingJob < ApplicationJob
  queue_as :webhooks

  retry_on WebhookError, attempts: 5
  discard_on ActiveJob::DeserializationError

  def perform(event_class_name, webhook_event)
    event_class_name.safe_constantize.new(webhook_event).process!
  end
end
# config/initializers/fuik.rb
Fuik.configure do |config|
  config.webhook_processing_job_class = "WebhookProcessingJob"
end

@eelcoj
eelcoj force-pushed the activejob-config branch from 98f0009 to 2d85715 Compare June 29, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant