Sha256: 8c734d3650ae6b40248fb23b76d4128f562ea5e4cf5ec05c0b6ea2f60b3abec2
Contents?: true
Size: 855 Bytes
Versions: 1
Compression:
Stored size: 855 Bytes
Contents
# frozen_string_literal: true module GoodJob # Ruby on Rails integration. class Railtie < ::Rails::Railtie config.good_job = ActiveSupport::OrderedOptions.new initializer "good_job.logger" do |_app| ActiveSupport.on_load(:good_job) do self.logger = ::Rails.logger end GoodJob::LogSubscriber.attach_to :good_job end initializer "good_job.active_job_notifications" do ActiveSupport::Notifications.subscribe "enqueue_retry.active_job" do |event| GoodJob::CurrentExecution.error_on_retry = event.payload[:error] end ActiveSupport::Notifications.subscribe "discard.active_job" do |event| GoodJob::CurrentExecution.error_on_discard = event.payload[:error] end end config.after_initialize do GoodJob::Scheduler.instances.each(&:warm_cache) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
good_job-1.11.3 | lib/good_job/railtie.rb |