Class: ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper
- Inherits:
-
Object
- Object
- ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper
- Defined in:
- lib/active_job/queue_adapters/delayed_job_adapter.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#job_data ⇒ Object
Returns the value of attribute job_data.
Instance Method Summary collapse
- #display_name ⇒ Object
-
#initialize(job_data) ⇒ JobWrapper
constructor
A new instance of JobWrapper.
- #perform ⇒ Object
Constructor Details
#initialize(job_data) ⇒ JobWrapper
Returns a new instance of JobWrapper.
42 43 44 |
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 42 def initialize(job_data) @job_data = job_data end |
Instance Attribute Details
#job_data ⇒ Object
Returns the value of attribute job_data.
40 41 42 |
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 40 def job_data @job_data end |
Instance Method Details
#display_name ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 46 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 |
#perform ⇒ Object
54 55 56 |
# File 'lib/active_job/queue_adapters/delayed_job_adapter.rb', line 54 def perform Base.execute(job_data) end |