Sha256: af31a82385a17de1a6b87e5c016686b1eebf8f9fae667c7b5372572002c24212

Contents?: true

Size: 626 Bytes

Versions: 8

Compression:

Stored size: 626 Bytes

Contents

module ActiveJob
  module QueueAdapters
    class GoodJobAdapter < GoodJob::Adapter
      def initialize(execution_mode: nil)
        execution_mode = if execution_mode
                           execution_mode
                         elsif ENV['GOOD_JOB_EXECUTION_MODE'].present?
                           ENV['GOOD_JOB_EXECUTION_MODE'].to_sym
                         elsif Rails.env.development? || Rails.env.test?
                           :inline
                         else
                           :external
                         end

        super(execution_mode: execution_mode)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
good_job-1.0.3 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-1.0.2 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-1.0.1 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-1.0.0 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-0.9.0 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-0.8.2 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-0.8.1 lib/active_job/queue_adapters/good_job_adapter.rb
good_job-0.8.0 lib/active_job/queue_adapters/good_job_adapter.rb