123456789_123456789_123456789_123456789_123456789_

Class: ActiveJob::QueueAdapters::InlineAdapter

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveJob::QueueAdapters::AbstractAdapter
Defined in: activejob/lib/active_job/queue_adapters/inline_adapter.rb

Overview

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

Instance Attribute Summary

AbstractAdapter - Inherited

#enqueue_after_transaction_commit?

Defines whether enqueuing should happen implicitly to after commit when called from inside a transaction.

Instance Method Summary

AbstractAdapter - Inherited

Instance Attribute Details

#enqueue_after_transaction_commit?Boolean (readonly)

This method is for internal use only.
[ GitHub ]

  
# File 'activejob/lib/active_job/queue_adapters/inline_adapter.rb', line 14

def enqueue_after_transaction_commit? # :nodoc:
  false
end

Instance Method Details

#enqueue(job)

This method is for internal use only.
[ GitHub ]

  
# File 'activejob/lib/active_job/queue_adapters/inline_adapter.rb', line 18

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

#enqueue_at

This method is for internal use only.

Raises:

  • (NotImplementedError)
[ GitHub ]

  
# File 'activejob/lib/active_job/queue_adapters/inline_adapter.rb', line 22

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