class ActiveJob::Base

  • SerializationError - Error class for serialization errors.
    * DeserializationError - Error class for deserialization errors.
    == Exceptions
    ProcessPhotoJob.perform_now(photo)
    A job can also be processed immediately without sending to the queue:
    More information can be found in ActiveJob::Core::ClassMethods#set
    ProcessPhotoJob.set(wait_until: Date.tomorrow.noon).perform_later(photo)
    To enqueue a job to be processed at some point in the future:
    ProcessPhotoJob.perform_later(photo)
    To enqueue a job to be performed as soon as the queuing system is free:
    ID. More information can be found in Arguments.
    Records that are passed in are serialized/deserialized using Global
    end
    end
    photo.upload!
    photo.resize_to_fit!(300, 300)
    photo.rotate!(90.degrees)
    photo.watermark!(‘Rails’)
    def perform(photo)
    class ProcessPhotoJob < ActiveJob::Base
    To define an Active Job object:
    implement is the “perform” method.
    from the ActiveJob::Base class. The only necessary method to
    Active Job objects can be defined by creating a class that inherits
    A list of supported adapters can be found in QueueAdapters.
    ActiveJob::Base.queue_adapter = :inline
    queuing frameworks. To specify a queue adapter to use:
    Active Job objects can be configured to work with different backend
    = Active Job
    :nodoc: