Sha256: a5e319940f5031cfbea34734b4abfd774f76f5ecdffb116e1f385f99c8a3e69d

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

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

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

raise "You need to specify a file!" unless opts[:file]

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

1 entries across 1 versions & 1 rubygems

Version Path
jflow-0.2.9 bin/jflow_worker