From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.org
Subject: [PATCH] last_data_recv: do not assume Unicorn includes all constants
Date: Tue, 5 Nov 2013 07:07:35 +0000 [thread overview]
Message-ID: <20131105070735.GA21259@dcvr.yhbt.net> (raw)
In-Reply-To: <20131105070735.GA21259@dcvr.yhbt.net>
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
parent reply other threads:[~2013-11-05 7:07 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20131105070735.GA21259@dcvr.yhbt.net>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/raindrops/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131105070735.GA21259@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=raindrops@librelist.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/raindrops.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).