<commit_before>if Hanami.env?(:production)
  uri = URI.parse(ENV.fetch("REDISTOGO_URL"))
  REDIS = ConnectionPool.new(size: 5, timeout: 3) { Redis.new(driver: :hiredis, host: uri.host, port: uri.port, password: uri.password) }
elsif Hanami.env?(:test)
  REDIS = ConnectionPool.new(size: 5, timeout: 3) { MockRedis.new }
else
  REDIS = ConnectionPool.new(size: 5, timeout: 3) { Redis.new(host: 'localhost', port: 6379) }
end<commit_msg>Reduce redis connection in prod env<commit_after>if Hanami.env?(:production)
  uri = URI.parse(ENV.fetch("REDISTOGO_URL"))
  REDIS = ConnectionPool.new(size: 3, timeout: 3) { Redis.new(driver: :hiredis, host: uri.host, port: uri.port, password: <PASSWORD>) }
elsif Hanami.env?(:test)
  REDIS = ConnectionPool.new(size: 5, timeout: 3) { MockRedis.new }
else
  REDIS = ConnectionPool.new(size: 5, timeout: 3) { Redis.new(host: 'localhost', port: 6379) }
end
{'fraction_non_alphanumeric': 0.16292134831460675, 'fraction_numerical': 0.02247191011235955, 'mean_word_length': 5.5036496350364965, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6117135', 'n_tokens_mistral': 354, 'n_tokens_neox': 329, 'n_words': 76}