Class: Whenever::JobRunner

Inherits:
Object
  • Object
show all
Defined in:
app/services/whenever/job_runner.rb

Instance Method Summary collapse

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

#commandObject



11
12
13
# File 'app/services/whenever/job_runner.rb', line 11

def command
  web_job.output
end

#runObject



7
8
9
# File 'app/services/whenever/job_runner.rb', line 7

def run
  `#{environment_variables} #{command}`
end