From a9e57ce5e46f57e75bc5542d1a1cc606488c090d Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 29 Jan 2014 16:00:24 +0100 Subject: [PATCH] Load unicorn worker killer only in production --- config.ru | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config.ru b/config.ru index 321f1ff..488ad38 100644 --- a/config.ru +++ b/config.ru @@ -1,7 +1,9 @@ # This file is used by Rack-based servers to start the application. -require 'unicorn/worker_killer' -use Unicorn::WorkerKiller::Oom, (160*(1024**2)), (180*(1024**2)) +if ENV['RAILS_ENV'] == 'production' + require 'unicorn/worker_killer' + use Unicorn::WorkerKiller::Oom, (160*(1024**2)), (180*(1024**2)) +end require ::File.expand_path('../config/environment', __FILE__)