<commit_before>root_dir = File.expand_path(File.dirname(__FILE__)+"/../").to_s
require 'resque'
require "#{root_dir}/config/redis"

PIDFILE          = ENV['UNICORN_PID'] || "#{root_dir}/tmp/pids/unicorn.pid"
WORKER_PROCESSES = ENV['UNICORN_WORKER_PROCESSES'] || "1"
PORT             = ENV['UNICORN_PORT'] || "3000"
UNICORN_LOG      = ENV['UNICORN_LOG'] || "#{root_dir}/log/unicorn.log"

worker_processes WORKER_PROCESSES.to_i
listen PORT.to_i
pid PIDFILE
stderr_path UNICORN_LOG
stdout_path UNICORN_LOG
timeout 15<commit_msg>output some env info when booting unicorn<commit_after>root_dir = File.expand_path(File.dirname(__FILE__)+"/../").to_s
require 'resque'
require "#{root_dir}/config/redis"

PIDFILE          = ENV['UNICORN_PID'] || "#{root_dir}/tmp/pids/unicorn.pid"
WORKER_PROCESSES = ENV['UNICORN_WORKER_PROCESSES'] || "1"
PORT             = ENV['UNICORN_PORT'] || "3000"
UNICORN_LOG      = ENV['UNICORN_LOG'] || "#{root_dir}/log/unicorn.log"

puts "Booting unicorn"
['UNICORN_PORT','UNICORN_PID','UNICORN_LOG','UNICORN_WORKER_PROCESSES'].each do |k|
  puts "env[#{k}]: #{ENV[k]}"
end
worker_processes WORKER_PROCESSES.to_i
listen PORT.to_i
pid PIDFILE
stderr_path UNICORN_LOG
stdout_path UNICORN_LOG
timeout 15
{'fraction_non_alphanumeric': 0.15340442986054142, 'fraction_numerical': 0.011484823625922888, 'mean_word_length': 5.48936170212766, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2048664', 'n_tokens_mistral': 528, 'n_tokens_neox': 483, 'n_words': 75}