<commit_before>require "daimon_skycrawlers/processor/default"

module DaimonSkycrawlers
  class HTTPResponseConsumer
    include SongkickQueue::Consumer

    consume_from_queue 'daimon-skycrawler.http-response'

    class << self
      def register(&block)
        processors << block
      end

      def processors
        @processors ||= []
      end

      def default_processor
        DaimonSkycrawlers::Processor::Default.new
      end
    end

    def process(message)
      if self.class.processors.empty?
        processors = self.class.processors
      else
        processors = [self.class.default_processor]
      end
      processors.each do |processor|
        processor.call(message)
      end
    end
  end
end
<commit_msg>Invert condition<commit_after>require "daimon_skycrawlers/processor/default"

module DaimonSkycrawlers
  class HTTPResponseConsumer
    include SongkickQueue::Consumer

    consume_from_queue 'daimon-skycrawler.http-response'

    class << self
      def register(&block)
        processors << block
      end

      def processors
        @processors ||= []
      end

      def default_processor
        DaimonSkycrawlers::Processor::Default.new
      end
    end

    def process(message)
      if self.class.processors.empty?
        processors = [self.class.default_processor]
      else
        processors = self.class.processors
      end
      processors.each do |processor|
        processor.call(message)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.07012811867835468, 'fraction_numerical': 0.0, 'mean_word_length': 2.467289719626168, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2005602', 'n_tokens_mistral': 443, 'n_tokens_neox': 426, 'n_words': 89}