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