Class: Whenever::JobRunner
- Inherits:
-
Object
- Object
- Whenever::JobRunner
- Defined in:
- app/services/whenever/job_runner.rb
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(job_id) ⇒ JobRunner
constructor
A new instance of JobRunner.
- #run ⇒ Object
Constructor Details
#initialize(job_id) ⇒ JobRunner
Returns a new instance of JobRunner.
3 4 5 |
# File 'app/services/whenever/job_runner.rb', line 3 def initialize job_id @job_id = job_id.to_i end |
Instance Method Details
#command ⇒ Object
11 12 13 |
# File 'app/services/whenever/job_runner.rb', line 11 def command web_job.output end |
#run ⇒ Object
7 8 9 |
# File 'app/services/whenever/job_runner.rb', line 7 def run `#{environment_variables} #{command}` end |