Sha256: 5497f6149903fbf1ea237a3ca290adf5dd5a20bfda889992d846a923f245e7e2

Contents?: true

Size: 695 Bytes

Versions: 6

Compression:

Stored size: 695 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!

  defined?(::TraceView) and
    ::TraceView.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

  defined?(::TraceView) and
    ::TraceView.reconnect!
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
traceview-3.8.4-java examples/unicorn_on_heroku_config.rb
traceview-3.8.4 examples/unicorn_on_heroku_config.rb
traceview-3.8.3-java examples/unicorn_on_heroku_config.rb
traceview-3.8.3 examples/unicorn_on_heroku_config.rb
traceview-3.8.2-java examples/unicorn_on_heroku_config.rb
traceview-3.8.2 examples/unicorn_on_heroku_config.rb