Class: Workhorse::Jobs::RunActiveJob
- Inherits:
-
Object
- Object
- Workhorse::Jobs::RunActiveJob
- Defined in:
- lib/workhorse/jobs/run_active_job.rb
Instance Attribute Summary collapse
-
#job_data ⇒ Object
readonly
Returns the value of attribute job_data.
Instance Method Summary collapse
-
#initialize(job_data) ⇒ RunActiveJob
constructor
A new instance of RunActiveJob.
- #job_class ⇒ Object
- #perform ⇒ Object
Constructor Details
#initialize(job_data) ⇒ RunActiveJob
Returns a new instance of RunActiveJob.
5 6 7 |
# File 'lib/workhorse/jobs/run_active_job.rb', line 5 def initialize(job_data) @job_data = job_data end |
Instance Attribute Details
#job_data ⇒ Object (readonly)
Returns the value of attribute job_data.
3 4 5 |
# File 'lib/workhorse/jobs/run_active_job.rb', line 3 def job_data @job_data end |
Instance Method Details
#job_class ⇒ Object
9 10 11 |
# File 'lib/workhorse/jobs/run_active_job.rb', line 9 def job_class @job_data['job_class'].safe_constantize end |
#perform ⇒ Object
13 14 15 |
# File 'lib/workhorse/jobs/run_active_job.rb', line 13 def perform ActiveJob::Base.execute(@job_data) end |