mirror of https://github.com/rails/rails
Merge pull request #16944 from akshay-vishnoi/docs-rails-4point2
[ci skip] AJ docs fixes
This commit is contained in:
commit
1bf1386a2b
|
@ -36,7 +36,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def before_perform(*filters, &blk)
|
||||
set_callback(:perform, :before, *filters, &blk)
|
||||
|
@ -55,7 +55,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def after_perform(*filters, &blk)
|
||||
set_callback(:perform, :after, *filters, &blk)
|
||||
|
@ -75,7 +75,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def around_perform(*filters, &blk)
|
||||
set_callback(:perform, :around, *filters, &blk)
|
||||
|
@ -94,7 +94,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def before_enqueue(*filters, &blk)
|
||||
set_callback(:enqueue, :before, *filters, &blk)
|
||||
|
@ -113,7 +113,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def after_enqueue(*filters, &blk)
|
||||
set_callback(:enqueue, :after, *filters, &blk)
|
||||
|
@ -134,7 +134,7 @@ module ActiveJob
|
|||
# def perform(video_id)
|
||||
# Video.find(video_id).process
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def around_enqueue(*filters, &blk)
|
||||
set_callback(:enqueue, :around, *filters, &blk)
|
||||
|
|
|
@ -13,7 +13,7 @@ module ActiveJob
|
|||
# Job Identifier
|
||||
attr_accessor :job_id
|
||||
|
||||
# Queue on which the job should be run on.
|
||||
# Queue in which the job will reside.
|
||||
attr_writer :queue_name
|
||||
end
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ module ActiveJob
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
module ClassMethods
|
||||
# Push a job onto the queue. The arguments must be legal JSON types
|
||||
# Push a job onto the queue. The arguments must be legal JSON types
|
||||
# (string, int, float, nil, true, false, hash or array) or
|
||||
# GlobalID::Identification instances. Arbitrary Ruby objects
|
||||
# GlobalID::Identification instances. Arbitrary Ruby objects
|
||||
# are not supported.
|
||||
#
|
||||
# Returns an instance of the job class queued with args available in
|
||||
|
@ -22,7 +22,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
# Reschedule the job to be re-executed. This is usefull in combination
|
||||
# Reschedule the job to be re-executed. This is useful in combination
|
||||
# with the +rescue_from+ option. When you rescue an exception from your job
|
||||
# you can ask Active Job to retry performing your job.
|
||||
#
|
||||
|
@ -45,7 +45,7 @@ module ActiveJob
|
|||
enqueue options
|
||||
end
|
||||
|
||||
# Equeue the job to be performed by the queue adapter.
|
||||
# Enqueues the job to be performed by the queue adapter.
|
||||
#
|
||||
# ==== Options
|
||||
# * <tt>:wait</tt> - Enqueues the job with the specified delay
|
||||
|
|
|
@ -22,7 +22,7 @@ module ActiveJob
|
|||
end
|
||||
|
||||
# Performs the job immediately. The job is not sent to the queueing adapter
|
||||
# and will block the execution until it's finished.
|
||||
# but directly executed by blocking the execution of others until it's finished.
|
||||
#
|
||||
# MyJob.new(*args).perform_now
|
||||
def perform_now
|
||||
|
|
|
@ -50,7 +50,7 @@ module ActiveJob
|
|||
logger.formatter.current_tags.include?("ActiveJob")
|
||||
end
|
||||
|
||||
class LogSubscriber < ActiveSupport::LogSubscriber
|
||||
class LogSubscriber < ActiveSupport::LogSubscriber #:nodoc:
|
||||
def enqueue(event)
|
||||
info do
|
||||
job = event.payload[:job]
|
||||
|
|
|
@ -14,7 +14,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
class << self
|
||||
def perform(job_data)
|
||||
Base.execute job_data
|
||||
|
|
|
@ -13,7 +13,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
def perform(job_data)
|
||||
Base.execute(job_data)
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper < Qu::Job
|
||||
class JobWrapper < Qu::Job #:nodoc:
|
||||
def initialize(job_data)
|
||||
@job_data = job_data
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper < Que::Job
|
||||
class JobWrapper < Que::Job #:nodoc:
|
||||
def run(job_data)
|
||||
Base.execute job_data
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
class << self
|
||||
def perform(job_data)
|
||||
Base.execute job_data
|
||||
|
|
|
@ -29,7 +29,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
class << self
|
||||
def perform(job_data)
|
||||
Base.execute job_data
|
||||
|
|
|
@ -23,7 +23,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(job_data)
|
||||
|
|
|
@ -19,7 +19,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
include Sneakers::Worker
|
||||
from_queue 'default'
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module ActiveJob
|
|||
end
|
||||
end
|
||||
|
||||
class JobWrapper
|
||||
class JobWrapper #:nodoc:
|
||||
include SuckerPunch::Job
|
||||
|
||||
def perform(job_data)
|
||||
|
|
Loading…
Reference in New Issue