Sha256: 47476397f7e73e7bb8333820e052e6b08c176668b63d1fa2fcff4a5e291ab0d9
Contents?: true
Size: 790 Bytes
Versions: 8
Compression:
Stored size: 790 Bytes
Contents
#!/usr/bin/env ruby $: << File.dirname(__FILE__) + '/../lib' unless $:.include?(File.dirname(__FILE__) + '/../lib/') require 'rubygems' require 'log4r' require 'log4r/outputter/syslogoutputter' require 'flapjack/cli/worker' at_exit do puts "Shutting down" end trap("INT") do puts "Caught shutdown signal, cleaning up." exit end @options = Flapjack::WorkerOptions.parse(ARGV) @worker = Flapjack::Worker.new(:host => @options.host, :port => @options.port, :checks_directory => @options.check_directory) begin @worker.process_loop rescue Beanstalk::NotConnected puts "Couldn't connect to the beanstalk!" timeout = 5 puts "Retrying in #{timeout} seconds" sleep timeout puts "Retrying..." retry end
Version data entries
8 entries across 8 versions & 2 rubygems