From 37a17fed9a3f9efd7713da950d3e0e1960aa3741 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sat, 5 Sep 2015 10:09:04 +0200 Subject: [PATCH] Update rubocop to version 0.34.0 --- Gemfile.lock | 2 +- config/unicorn.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f3ec233..bb41e49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,7 +174,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rubocop (0.33.0) + rubocop (0.34.0) astrolabe (~> 1.3) parser (>= 2.2.2.5, < 3.0) powerpack (~> 0.1) diff --git a/config/unicorn.rb b/config/unicorn.rb index 894ea79..a25de5c 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -2,17 +2,15 @@ worker_processes 3 timeout 30 preload_app true -before_fork do |server, worker| +before_fork do Signal.trap 'TERM' do - puts 'Unicorn master intercepting TERM and sending myself QUIT instead' Process.kill 'QUIT', Process.pid end ActiveRecord::Base.connection.disconnect! end -after_fork do |server, worker| +after_fork do Signal.trap 'TERM' do - puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT' end ActiveRecord::Base.establish_connection end