<commit_before># unicorn configuration
# based on GitHub's configuration
# unicorn -c ./config/unicorn.rb -E production -D

rails_env = ENV['RAILS_ENV'] || 'production'

# 2 workers and 1 master
worker_processes 2

# Load application into the master before forking workers
# for super-fast worker spawn times
preload_app true

# Restart any workers that haven't responded in 30 seconds
timeout 30

# Listen on a unix socket
listen File.absolute_path('../shared/unicorn.sock'), :backlog => 2048

# Setup pid file
pid './tmp/pids/unicorn.pid'

# Log to /application/current/log/ files, we are allready in RAILS_ROOT
stderr_path 'log/unicorn.err.log'
stdout_path 'log/unicorn.log'


##
# Ruby Enterprise Edition (REE) with COW
# http://www.rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
if GC.respond_to?(:copy_on_write_friendly=)
  GC.copy_on_write_friendly = true
end


before_fork do |server, worker|<commit_msg>Capistrano unicorn<commit_after># unicorn configuration
# based on GitHub's configuration
# unicorn -c ./config/unicorn.rb -E production -D

rails_env = ENV['RAILS_ENV'] || 'production'

# 2 workers and 1 master
worker_processes 2

# Load application into the master before forking workers
# for super-fast worker spawn times
preload_app true

# Restart any workers that haven't responded in 30 seconds
timeout 30

# Listen on a unix socket
listen File.absolute_path('./tmp/sockets/unicorn.sock'), :backlog => 2048

# Setup pid file
pid './tmp/pids/unicorn.pid'

# Log to /application/current/log/ files, we are allready in RAILS_ROOT
stderr_path 'log/unicorn.err.log'
stdout_path 'log/unicorn.log'


##
# Ruby Enterprise Edition (REE) with COW
# http://www.rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
if GC.respond_to?(:copy_on_write_friendly=)
  GC.copy_on_write_friendly = true
end


before_fork do |server, worker|
{'fraction_non_alphanumeric': 0.09962100703844072, 'fraction_numerical': 0.011911207363291824, 'mean_word_length': 4.885350318471337, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2709590', 'n_tokens_mistral': 646, 'n_tokens_neox': 603, 'n_words': 184}