Class: ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_data) ⇒ JobWrapper

Returns a new instance of JobWrapper.



34
35
36
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 34

def initialize(job_data)
  @job_data = job_data
end

Instance Attribute Details

#job_dataObject

Returns the value of attribute job_data.



32
33
34
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 32

def job_data
  @job_data
end

Instance Method Details

#display_nameObject



38
39
40
41
42
43
44
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 38

def display_name
  base_name = "#{job_data["job_class"]} [#{job_data["job_id"]}] from DelayedJob(#{job_data["queue_name"]})"

  return base_name unless log_arguments?

  "#{base_name} with arguments: #{job_data["arguments"]}"
end

#performObject



46
47
48
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 46

def perform
  Base.execute(job_data)
end