Sha256: 5f14934b33c543310c141e5a0a9d61046a98d86e83a754a10afea4eeef2f58c4

Contents?: true

Size: 635 Bytes

Versions: 6

Compression:

Stored size: 635 Bytes

Contents

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

# rubocop:disable Output
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) && 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) && ActiveRecord::Base.establish_connection
end
# rubocop:enable Output

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
smalruby-editor-0.4.1-x86-mingw32 config/unicorn.rb
smalruby-editor-0.4.2-x86-mingw32 config/unicorn.rb
smalruby-editor-0.4.2 config/unicorn.rb
smalruby-editor-0.4.1 config/unicorn.rb
smalruby-editor-0.4.0-x86-mingw32 config/unicorn.rb
smalruby-editor-0.4.0 config/unicorn.rb