Sha256: 5fa0626ee9a59399658db15eab0becc8e41a8ea495a989a89d56d185ba23af9a

Contents?: true

Size: 425 Bytes

Versions: 12

Compression:

Stored size: 425 Bytes

Contents

#!/usr/bin/env ruby
require "jflow"
require "optparse"

ENV['APP_ROOT'] = Dir.pwd

puts ENV['APP_ROOT']

opts = {:file => "worker.json"}
OptionParser.new do |opt|
  opt.on('-f filename') { |o| opts[:file] = o }
end.parse!

configuration = JSON.parse(File.read(opts[:file]))

cli = JFlow::Cli.new(configuration)

["INT", "TERM"].each do |signal|
  Signal.trap(signal) do
    cli.shutdown_workers
  end
end

cli.start_workers

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
jflow-0.5.1 bin/jflow_worker
jflow-0.5.0 bin/jflow_worker
jflow-0.4.5 bin/jflow_worker
jflow-0.4.4 bin/jflow_worker
jflow-0.4.3 bin/jflow_worker
jflow-0.4.2 bin/jflow_worker
jflow-0.4.1 bin/jflow_worker
jflow-0.4.0 bin/jflow_worker
jflow-0.3.6 bin/jflow_worker
jflow-0.3.5 bin/jflow_worker
jflow-0.3.4 bin/jflow_worker
jflow-0.3.3 bin/jflow_worker