mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
18 lines
347 B
Ruby
18 lines
347 B
Ruby
# 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(...).perform_now
|
|
end
|
|
|
|
def perform_later(...)
|
|
@job_class.new(...).enqueue @options
|
|
end
|
|
end
|
|
end
|