Sha256: ed2243747db730259f21dfe44f6c4c86661af70564bcbd2fa8d4f13c0e820680

Contents?: true

Size: 817 Bytes

Versions: 59

Compression:

Stored size: 817 Bytes

Contents

#!/usr/bin/env ruby
# encoding: utf-8
# 20121112 masa workflow manager client
Version = '20140116-084302'

require 'drb/drb' 

unless job_id = ARGV[0]
	puts "Usage:\n #{__FILE__} [job_id] [server] ([new status])"
  puts
  puts "  job_id: required"
  puts "  server: workflow_manager URI (default: druby://localhost:12345)"
  puts "  new status: success, running, or fail"
	exit
end
uri = ARGV[1]||'druby://localhost:12345'
new_status = ARGV[2]
wfmrc = if File.exist?(".wfmrc")
          ".wfmrc"
        elsif File.exist?(File.expand_path("~/.wfmrc"))
          File.expand_path("~/.wfmrc")
        end
if wfmrc
  File.readlines(wfmrc).each do |line|
    if line =~ /server:\s*(druby.+)/
      uri = $1
    end
  end
end
workflow_manager = DRbObject.new_with_uri(uri)
puts workflow_manager.status(job_id, new_status)

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
workflow_manager-0.5.4 bin/wfm_status
workflow_manager-0.5.3 bin/wfm_status
workflow_manager-0.5.2 bin/wfm_status
workflow_manager-0.5.1 bin/wfm_status
workflow_manager-0.5.0 bin/wfm_status
workflow_manager-0.4.8 bin/wfm_status
workflow_manager-0.4.7 bin/wfm_status
workflow_manager-0.4.6 bin/wfm_status
workflow_manager-0.4.5 bin/wfm_status
workflow_manager-0.4.4 bin/wfm_status
workflow_manager-0.4.3 bin/wfm_status
workflow_manager-0.4.2 bin/wfm_status
workflow_manager-0.4.1 bin/wfm_status
workflow_manager-0.4.0 bin/wfm_status
workflow_manager-0.3.9 bin/wfm_status
workflow_manager-0.3.8 bin/wfm_status
workflow_manager-0.3.7 bin/wfm_status
workflow_manager-0.3.6 bin/wfm_status
workflow_manager-0.3.5 bin/wfm_status
workflow_manager-0.3.4 bin/wfm_status