Sha256: 5d59fc9d665af6ba0b6e826de9b75e96bcd5d8898adb04d0a6e6a3d2202a6f94

Contents?: true

Size: 354 Bytes

Versions: 50

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

module ActiveJob
  class ConfiguredJob #:nodoc:
    def initialize(job_class, options = {})
      @options = options
      @job_class = job_class
    end

    def perform_now(*args)
      @job_class.new(*args).perform_now
    end

    def perform_later(*args)
      @job_class.new(*args).enqueue @options
    end
  end
end

Version data entries

50 entries across 50 versions & 6 rubygems

Version Path
activejob-5.2.8.1 lib/active_job/configured_job.rb
activejob-5.2.8 lib/active_job/configured_job.rb
activejob-5.2.7.1 lib/active_job/configured_job.rb
activejob-5.2.7 lib/active_job/configured_job.rb
activejob-5.2.6.3 lib/active_job/configured_job.rb
activejob-5.2.6.2 lib/active_job/configured_job.rb
activejob-5.2.6.1 lib/active_job/configured_job.rb
activejob-5.2.6 lib/active_job/configured_job.rb
activejob-5.2.4.6 lib/active_job/configured_job.rb
activejob-5.2.5 lib/active_job/configured_job.rb
activejob-5.2.4.5 lib/active_job/configured_job.rb
activejob-5.2.4.4 lib/active_job/configured_job.rb
activejob-5.2.4.3 lib/active_job/configured_job.rb
activejob-6.0.2.2 lib/active_job/configured_job.rb
activejob-5.2.4.2 lib/active_job/configured_job.rb
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/activejob-6.0.2.1/lib/active_job/configured_job.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/activejob-6.0.2.1/lib/active_job/configured_job.rb
activejob-6.0.2.1 lib/active_job/configured_job.rb
activejob-5.2.4.1 lib/active_job/configured_job.rb
activejob-6.0.2 lib/active_job/configured_job.rb