Sha256: ff45a1584b908e3a44594788a175578cf373141d773e02cb8de64b241da4fe7d

Contents?: true

Size: 474 Bytes

Versions: 41

Compression:

Stored size: 474 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

    def perform_all_later(multi_args)
      @job_class.perform_all_later(multi_args, options: @options)
    end
  end
end

Version data entries

41 entries across 41 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.4/lib/active_job/configured_job.rb
activejob-8.0.1 lib/active_job/configured_job.rb
activejob-8.0.0.1 lib/active_job/configured_job.rb
activejob-7.2.2.1 lib/active_job/configured_job.rb
activejob-7.1.5.1 lib/active_job/configured_job.rb
activejob-8.0.0 lib/active_job/configured_job.rb
activejob-7.2.2 lib/active_job/configured_job.rb
activejob-7.1.5 lib/active_job/configured_job.rb
activejob-8.0.0.rc2 lib/active_job/configured_job.rb
activejob-7.2.1.2 lib/active_job/configured_job.rb
activejob-7.1.4.2 lib/active_job/configured_job.rb
activejob-8.0.0.rc1 lib/active_job/configured_job.rb
activejob-7.2.1.1 lib/active_job/configured_job.rb
activejob-7.1.4.1 lib/active_job/configured_job.rb
activejob-8.0.0.beta1 lib/active_job/configured_job.rb
omg-activejob-8.0.0.alpha9 lib/active_job/configured_job.rb
omg-activejob-8.0.0.alpha8 lib/active_job/configured_job.rb
omg-activejob-8.0.0.alpha7 lib/active_job/configured_job.rb
omg-activejob-8.0.0.alpha4 lib/active_job/configured_job.rb
omg-activejob-8.0.0.alpha3 lib/active_job/configured_job.rb