Class: Delayed::JobWrapper
- Inherits:
-
Object
- Object
- Delayed::JobWrapper
- Defined in:
- lib/delayed/job_wrapper.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.
7 8 9 |
# File 'lib/delayed/job_wrapper.rb', line 7 def initialize(job_data) @job_data = job_data end |
Instance Attribute Details
#job_data ⇒ Object
Returns the value of attribute job_data.
3 4 5 |
# File 'lib/delayed/job_wrapper.rb', line 3 def job_data @job_data end |
Instance Method Details
#display_name ⇒ Object
11 12 13 |
# File 'lib/delayed/job_wrapper.rb', line 11 def display_name job_data['job_class'] end |
#encode_with(coder) ⇒ Object
21 22 23 |
# File 'lib/delayed/job_wrapper.rb', line 21 def encode_with(coder) coder['job_data'] = @job_data end |
#perform ⇒ Object
15 16 17 18 19 |
# File 'lib/delayed/job_wrapper.rb', line 15 def perform ActiveJob::Callbacks.run_callbacks(:execute) do job.perform_now end end |