From 18cf23a81715b83648388dc81d0a31d848d5fd06 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Sun, 10 May 2015 11:11:01 -0700 Subject: [PATCH] update OOB gc hook for unicorn --- Gemfile | 2 ++ Gemfile.lock | 2 ++ config.ru | 5 ++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index d7a2b9dab..c344dfc2b 100644 --- a/Gemfile +++ b/Gemfile @@ -57,6 +57,8 @@ gem 'aws-s3', :require => "aws/s3", :git => "https://github.com/fnando/aws-s3.gi group :production do gem 'unicorn', :platforms => :ruby + # gem 'unicorn-worker-killer' + gem 'gctools' gem 'capistrano-unicorn', :require => false end diff --git a/Gemfile.lock b/Gemfile.lock index ae2c5c6da..06daa306f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,6 +104,7 @@ GEM faraday (0.9.0) multipart-post (>= 1.2, < 3) ffaker (1.24.0) + gctools (0.2.3) hashie (3.3.1) highline (1.6.21) hike (1.2.3) @@ -310,6 +311,7 @@ DEPENDENCIES diff-lcs factory_girl ffaker + gctools kgio mechanize mocha diff --git a/config.ru b/config.ru index 01d93d0e5..f6310009d 100644 --- a/config.ru +++ b/config.ru @@ -3,9 +3,8 @@ require ::File.expand_path('../config/environment', __FILE__) if defined? Unicorn - require_dependency 'unicorn/oob_gc' - GC.disable - use Unicorn::OobGC + require_dependency 'gctools/oobgc' + use GC::OOB::UnicornMiddleware end run Rails.application