Class: ActiveJob::QueueAdapters::SolidQueueAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/active_job/queue_adapters/solid_queue_adapter.rb

Overview

Active Job SolidQueue adapter

To use it set the queue_adapter config to :solid_queue.

Rails.application.config.active_job.queue_adapter = :solid_queue

Instance Method Summary collapse

Instance Method Details

#enqueue(active_job) ⇒ Object

:nodoc:



15
16
17
# File 'lib/active_job/queue_adapters/solid_queue_adapter.rb', line 15

def enqueue(active_job) # :nodoc:
  SolidQueue::Job.enqueue(active_job)
end

#enqueue_after_transaction_commit?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/active_job/queue_adapters/solid_queue_adapter.rb', line 11

def enqueue_after_transaction_commit?
  true
end

#enqueue_all(active_jobs) ⇒ Object

:nodoc:



23
24
25
# File 'lib/active_job/queue_adapters/solid_queue_adapter.rb', line 23

def enqueue_all(active_jobs) # :nodoc:
  SolidQueue::Job.enqueue_all(active_jobs)
end

#enqueue_at(active_job, timestamp) ⇒ Object

:nodoc:



19
20
21
# File 'lib/active_job/queue_adapters/solid_queue_adapter.rb', line 19

def enqueue_at(active_job, timestamp) # :nodoc:
  SolidQueue::Job.enqueue(active_job, scheduled_at: Time.at(timestamp))
end