Sha256: 05fd165fbe378f852364955261759b9316d7ae68d3d570e0e114bdb25d9669c9

Contents?: true

Size: 582 Bytes

Versions: 4

Compression:

Stored size: 582 Bytes

Contents

worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 15
preload_app true

before_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
    Process.kill 'QUIT', Process.pid
  end

  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.connection.disconnect!
end

after_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
  end

  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.establish_connection
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
railsbricks-3.7.0 lib/railsbricks/assets/config/unicorn.rb
pwpush-0.1.0 config/unicorn.rb
phoenixbricks-3.2.7 lib/railsbricks/assets/config/unicorn.rb
phoenixbricks-3.2.6 lib/railsbricks/assets/config/unicorn.rb