Sha256: ca226bd9c643240394ee0156b1bed8a873c177f95e0fbfb1c626c4e750010132

Contents?: true

Size: 376 Bytes

Versions: 3

Compression:

Stored size: 376 Bytes

Contents

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

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

3 entries across 3 versions & 1 rubygems

Version Path
jflow-0.3.2 bin/jflow_worker
jflow-0.3.1 bin/jflow_worker
jflow-0.3.0 bin/jflow_worker