From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: [PATCH] last_data_recv: do not assume Unicorn includes all constants Date: Tue, 5 Nov 2013 07:07:35 +0000 Message-ID: <20131105070735.GA21259@dcvr.yhbt.net> References: <20131105070735.GA21259@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1383635261 7510 80.91.229.3 (5 Nov 2013 07:07:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2013 07:07:41 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Tue Nov 05 08:07:46 2013 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org In-Reply-To: <20131105070735.GA21259@dcvr.yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:134 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vdajp-0005q2-3k for gclrrg-raindrops@m.gmane.org; Tue, 05 Nov 2013 08:07:45 +0100 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id C702E74FA1 for ; Tue, 5 Nov 2013 07:08:52 +0000 (UTC) Some projects may load parts of Unicorn and not others. --- lib/raindrops/last_data_recv.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/raindrops/last_data_recv.rb b/lib/raindrops/last_data_recv.rb index f96a776..b4808a1 100644 --- a/lib/raindrops/last_data_recv.rb +++ b/lib/raindrops/last_data_recv.rb @@ -73,7 +73,9 @@ class Raindrops::LastDataRecv # :startdoc def initialize(opts = {}) - Raindrops::Aggregate::LastDataRecv.cornify! if defined?(Unicorn) + if defined?(Unicorn::HttpServer::LISTENERS) + Raindrops::Aggregate::LastDataRecv.cornify! + end @aggregate = opts[:aggregate] || Raindrops::Aggregate::LastDataRecv.default_aggregate end -- Eric Wong