lib/flapjack/processor.rb in flapjack-0.8.1 vs lib/flapjack/processor.rb in flapjack-0.8.2

- old
+ new

@@ -23,11 +23,10 @@ def initialize(opts = {}) @config = opts[:config] @redis_config = opts[:redis_config] || {} @logger = opts[:logger] - @coordinator = opts[:coordinator] @redis = Flapjack::RedisPool.new(:config => @redis_config, :size => 2) @queue = @config['queue'] || 'events' @@ -100,14 +99,11 @@ :logger => @logger, :block => ! @exit_on_queue_empty ) if @exit_on_queue_empty && event.nil? && Flapjack::Data::Event.pending_count(@queue, :redis => @redis) # SHUT IT ALL DOWN!!! @logger.warn "Shutting down as exit_on_queue_empty is true, and the queue is empty" - @should_quit = true - @coordinator.stop - # FIXME: seems the above call doesn't block until the remove_pikelets fiber exits... - EM::Synchrony.sleep(1) - exit + Process.kill('INT', Process.pid) + break end process_event(event) unless event.nil? end