Sha256: f5014ec92cad84e7920181e3003f5cc2fbf68d0852fec7adb2ac3d2ef37e5bf5

Contents?: true

Size: 412 Bytes

Versions: 1

Compression:

Stored size: 412 Bytes

Contents

module Whenever
  class JobRunner
    def initialize job_id
      @job_id  = job_id.to_i
    end

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

    def command
      web_job.output
    end

    protected

    def web_job
      @web_job ||= Web.job_list.fetch(@job_id)
    end

    def environment_variables
      @environment_variables ||= Web.job_list.environment_variables
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whenever-web-0.0.5 app/services/whenever/job_runner.rb