Class: ActiveQueue::Adapter::DelayedJobAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/active_queue/adapter/delayed_job_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DelayedJobAdapter

Returns a new instance of DelayedJobAdapter.



8
9
10
# File 'lib/active_queue/adapter/delayed_job_adapter.rb', line 8

def initialize(options = {})
  @options = options
end

Instance Method Details

#adapter_nameObject



11
12
13
# File 'lib/active_queue/adapter/delayed_job_adapter.rb', line 11

def adapter_name
  "delayed_job"
end

#enqueue(job_klass, options = { }) ⇒ Object



14
15
16
# File 'lib/active_queue/adapter/delayed_job_adapter.rb', line 14

def enqueue(job_klass, options = { })
  Delayed::Job.enqueue(job_klass.new(options))
end