<commit_before>require 'redis'

config = YAML.load_file('config/redis.yml')[Rails.env]
connection = -> {
  Redis.new config
}

require 'sidekiq'
Sidekiq.configure_client do |config|
  config.redis = ConnectionPool.new size: 10, &connection
end

Sidekiq.configure_server do |config|
  config.redis = ConnectionPool.new size: 10, &connection
  config.server_middleware do |chain|
    chain.add Sidekiq::Congestion::Limiter
  end
end

sidekiq_admin = YAML.load_file 'config/sidekiq_admin.yml'

require 'sidekiq/web'
Sidekiq::Web.use Rack::Auth::Basic do |name, password|
  name.present? &&
  password.present? &&
  name == sidekiq_admin['sidekiq_admin_name'] &&
  password == <PASSWORD>['<PASSWORD>']
end unless Rails.env.test? || Rails.env.development?

require 'sidetiq'
Sidetiq.configure do |config|
  config.utc = true
end

require 'sidetiq/web'

# preload autoloaded workers
Dir[Rails.root.join('app/workers/**/*.rb')].sort.each do |path|
  name = path.match(/workers\/(.+)\.rb$/)[1]
  name.classify.constantize unless path =~ /workers\/concerns/
end
<commit_msg>Fix typo<commit_after>require 'redis'

config = YAML.load_file('config/redis.yml')[Rails.env]
connection = -> {
  Redis.new config
}

require 'sidekiq'
Sidekiq.configure_client do |config|
  config.redis = ConnectionPool.new size: 10, &connection
end

Sidekiq.configure_server do |config|
  config.redis = ConnectionPool.new size: 10, &connection
  config.server_middleware do |chain|
    chain.add Sidekiq::Congestion::Limiter
  end
end

sidekiq_admin = YAML.load_file 'config/sidekiq_admin.yml'

require 'sidekiq/web'
Sidekiq::Web.use Rack::Auth::Basic do |name, password|
  name.present? &&
  password.present? &&
  name == sidekiq_admin['sidekiq_admin_name'] &&
  password == sidekiq_admin['side<PASSWORD>']
end unless Rails.env.test? || Rails.env.development?

require 'sidetiq'
Sidetiq.configure do |config|
  config.utc = true
end

require 'sidetiq/web'

# preload autoloaded workers
Dir[Rails.root.join('app/workers/**/*.rb')].sort.each do |path|
  name = path.match(/workers\/(.+)\.rb$/)[1]
  name.classify.constantize unless path =~ /workers\/concerns/
end

{'fraction_non_alphanumeric': 0.1472795497185741, 'fraction_numerical': 0.004690431519699813, 'mean_word_length': 4.892265193370166, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, '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': '5806395', 'n_tokens_mistral': 807, 'n_tokens_neox': 776, 'n_words': 153}