def go_ham
      loop do
        read_listeners
        reap_all_listeners(Process::WNOHANG)
        start_listener unless @paused
        case signal = SIGNAL_QUEUE.shift
        when nil
          yawn(@listener_backoff.how_long? || 30.0)
        when :INFO
          dump_object_counts
        when :HUP
          reopen_logs
          log "Restarting listener with new configuration and application."
          prepare_new_listener
        when :USR2
          log "Pause job processing"
          @paused = true
          kill_listener(:QUIT, @current_listener)
          @current_listener = nil
        when :CONT
          log "Resume job processing"
          @paused = false
          kill_all_listeners(:CONT)
        when :INT, :TERM, :QUIT
          log "Shutting down..."
          kill_all_listeners(signal)
          wait_for_workers unless @fast_exit
          break
        end
      end
    end
def go_ham
      loop do
        read_listeners
        reap_all_listeners(Process::WNOHANG)
        start_listener unless @paused
        case signal = SIGNAL_QUEUE.shift
        when nil
          yawn(@listener_backoff.how_long? || 30.0)
        when :INFO
          dump_object_counts
        when :HUP
          reopen_logs
          log "Restarting listener with new configuration and application."
          prepare_new_listener
        when :USR2
          log "Pause job processing"
          @paused = true
          kill_listener(:QUIT, @current_listener)
          @current_listener = nil
        when :CONT
          log "Resume job processing"
          @paused = false
          kill_all_listeners(:CONT)
        when :INT, :TERM, :QUIT
          log "Shutting down..."
          kill_all_listeners(signal)
          wait_for_workers unless @fast_exit
          break
        end
      end
    end
Private: dat main loop.