Class: Delayed::JobWrapper
- Inherits:
-
Object
- Object
- Delayed::JobWrapper
- Defined in:
- lib/delayed/active_job_adapter.rb
Overview
rubocop:disable Betterment/ActiveJobPerformable
Instance Attribute Summary collapse
-
#job_data ⇒ Object
Returns the value of attribute job_data.
Instance Method Summary collapse
- #display_name ⇒ Object
- #encode_with(coder) ⇒ 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.
45 46 47 |
# File 'lib/delayed/active_job_adapter.rb', line 45 def initialize(job_data) @job_data = job_data end |
Instance Attribute Details
#job_data ⇒ Object
Returns the value of attribute job_data.
41 42 43 |
# File 'lib/delayed/active_job_adapter.rb', line 41 def job_data @job_data end |
Instance Method Details
#display_name ⇒ Object
49 50 51 |
# File 'lib/delayed/active_job_adapter.rb', line 49 def display_name job_data['job_class'] end |
#encode_with(coder) ⇒ Object
59 60 61 |
# File 'lib/delayed/active_job_adapter.rb', line 59 def encode_with(coder) coder['job_data'] = @job_data end |
#perform ⇒ Object
53 54 55 56 57 |
# File 'lib/delayed/active_job_adapter.rb', line 53 def perform ActiveJob::Callbacks.run_callbacks(:execute) do job.perform_now end end |