Module: ActiveJob::PerformLater::Mixin

Defined in:
lib/active_job/perform_later/mixin.rb

Overview

perform_later entry point, mixed into Object.

Instance Method Summary collapse

Instance Method Details

#job_later(**options) ⇒ Proxy

Returns a proxy that builds the next method call as an Active Job without enqueuing it, resolved and checked like #perform_later.

Examples:

Hand a call to a Solid Queue batch callback

SolidQueue::Batch.enqueue(on_finish: import.job_later.finalize!) { ... }

Parameters:

  • options (Hash) —

    Active Job set options (:queue, :wait, :wait_until, :priority, ...)

Returns:

  • (Proxy) —

    proxy building jobs for method calls on this receiver

#perform_later(**options) ⇒ Proxy

Returns a proxy that enqueues the next method call as an Active Job instead of invoking it.

Examples:

Newsletter.perform_later(queue: :low).deliver_all

Parameters:

  • options (Hash) —

    Active Job set options (:queue, :wait, :wait_until, :priority, ...)

Returns:

  • (Proxy) —

    proxy enqueueing method calls on this receiver