Sha256: 32a265f64653b52ac89d14b4d3071b41ce9110d12e318168457f3d986071ad6a

Contents?: true

Size: 361 Bytes

Versions: 36

Compression:

Stored size: 361 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(...)
      @job_class.new(...).set(@options).perform_now
    end

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

Version data entries

36 entries across 34 versions & 4 rubygems

Version Path
activejob-7.0.8.7 lib/active_job/configured_job.rb
activejob-7.0.8.6 lib/active_job/configured_job.rb
activejob-7.0.8.5 lib/active_job/configured_job.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activejob-7.0.8.4/lib/active_job/configured_job.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activejob-7.0.5.1/lib/active_job/configured_job.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activejob-7.0.5.1/lib/active_job/configured_job.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activejob-7.0.5.1/lib/active_job/configured_job.rb
activejob-7.0.8.4 lib/active_job/configured_job.rb
activejob-7.0.8.1 lib/active_job/configured_job.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activejob-7.0.2.3/lib/active_job/configured_job.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activejob-7.0.3.1/lib/active_job/configured_job.rb
activejob-7.0.8 lib/active_job/configured_job.rb
activejob-7.0.7.2 lib/active_job/configured_job.rb
activejob-7.0.7.1 lib/active_job/configured_job.rb
activejob-7.0.7 lib/active_job/configured_job.rb
activejob-7.0.6 lib/active_job/configured_job.rb
activejob-7.0.5.1 lib/active_job/configured_job.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activejob-7.0.2.3/lib/active_job/configured_job.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activejob-7.0.3.1/lib/active_job/configured_job.rb
activejob-7.0.5 lib/active_job/configured_job.rb