Sha256: a82bc3e708353c64754bfc3fd924cb6b38873e7cbcee6cabac0ed686cf48d64f

Contents?: true

Size: 606 Bytes

Versions: 16

Compression:

Stored size: 606 Bytes

Contents

worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
 timeout 6000000
 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

16 entries across 16 versions & 1 rubygems

Version Path
wrgem-0.0.51 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.50 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.49 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.48 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.47 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.46 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.45 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.44 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.43 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.42 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.41 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.40 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.39 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.38 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.37 lib/generators/wrstart/template/unicorn.rb
wrgem-0.0.35 lib/generators/wrstart/template/unicorn.rb