Sha256: 105f11d258b09e118a3bfdfb6bd02f3b419e7e72229d47ff90f88ec0663cf145

Contents?: true

Size: 773 Bytes

Versions: 18

Compression:

Stored size: 773 Bytes

Contents

# frozen_string_literal: true

module ActiveJob
  module QueueAdapters
    # = Active Job Inline adapter
    #
    # When enqueuing jobs with the Inline adapter the job will be executed
    # immediately.
    #
    # To use the Inline set the queue_adapter config to +:inline+.
    #
    #   Rails.application.config.active_job.queue_adapter = :inline
    class InlineAdapter < AbstractAdapter
      def enqueue_after_transaction_commit? # :nodoc:
        false
      end

      def enqueue(job) # :nodoc:
        Base.execute(job.serialize)
      end

      def enqueue_at(*) # :nodoc:
        raise NotImplementedError, "Use a queueing backend to enqueue jobs in the future. Read more at https://guides.rubyonrails.org/active_job_basics.html"
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
activejob-7.2.2.1 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.2 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.1.2 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.1.1 lib/active_job/queue_adapters/inline_adapter.rb
activejob-8.0.0.beta1 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha9 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha8 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha7 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha4 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha3 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha2 lib/active_job/queue_adapters/inline_adapter.rb
omg-activejob-8.0.0.alpha1 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.1 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.0 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.0.rc1 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.0.beta3 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.0.beta2 lib/active_job/queue_adapters/inline_adapter.rb
activejob-7.2.0.beta1 lib/active_job/queue_adapters/inline_adapter.rb