Sha256: 33af0794292ed4b55a490549d74b30f5c919c399c4c54cc798792f06e4393cdc

Contents?: true

Size: 915 Bytes

Versions: 2

Compression:

Stored size: 915 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/../lib')

require 'trollop'
require "rjobs/jobs_file"
require "rjobs/job"
require "rjobs/job_handler"
require 'rjobs/cli_helper'
include  Rjobs::CliHelper   

banner = "================
Harvest all finished jobs described in the jobs file.
================
Usage:
       rjharvest [options] <filename>
where [options] are:
"

p = parser(banner)

opts = Trollop::with_standard_exception_handling p do
  o = p.parse ARGV
  raise Trollop::HelpNeeded if ARGV.empty? # show help screen
  o
end

Rjobs::JobHandler.host = opts[:host]
Rjobs::JobHandler.password = opts[:password]

jobs_file = ARGV[0]
raise "The file \"#{jobs_file}\" must exist." unless File.exist?(jobs_file) 

jobs = get_jobs_info(jobs_file)
jobs.each do |job| 
  Rjobs::JobHandler.get_job_results(job)        
end        

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rjobs-0.3.1.alpha bin/rjharvest
rjobs-0.3.0.alpha bin/rjharvest