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: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Fwd: Support for Soft Timeout in Unicorn Date: Thu, 3 Jun 2010 11:47:30 -0700 Message-ID: <20100603184730.GA2421@dcvr.yhbt.net> References: <20100603173749.GA19649@dcvr.yhbt.net> <20100603182246.GB19649@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1275590866 14707 80.91.229.12 (3 Jun 2010 18:47:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Jun 2010 18:47:46 +0000 (UTC) Cc: mongrel-unicorn@rubyforge.org To: Pierre Baillet Original-X-From: mongrel-unicorn-bounces@rubyforge.org Thu Jun 03 20:47:42 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:525 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OKFS7-0001PO-V7 for gclrug-mongrel-unicorn@m.gmane.org; Thu, 03 Jun 2010 20:47:40 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 5CEF8185834B; Thu, 3 Jun 2010 14:47:39 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 9E0701858335 for ; Thu, 3 Jun 2010 14:47:31 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 1700A1F4E5; Thu, 3 Jun 2010 18:47:31 +0000 (UTC) Pierre Baillet wrote: > Eric, > = > On Thu, Jun 3, 2010 at 8:22 PM, Eric Wong wrote: > > This would be doable as middleware, too, and if done carefully, even > > safely reusable in multi-threaded web servers. =A0This would be a good > > addition to rack-contrib, even. =A0I might consider doing it myself if I > > had time. > = > I also think that doing this as a Rack middleware is probably the > right way to do that kind of worker management. However the > application we use at fotopedia is still Rails 2.1 based (hence not > Rack compatible AFAIK). This probably means we'll have keep on > maintaining this slightly hacked version on our own then. Actually, internally, Unicorn only knows about Rack and wraps older CGI-based Rails using the Unicorn::App::OldRails application (via Unicorn::CGIWrapper). "unicorn_rails" basically wraps up the following config for you, but you could achieve the same effect using "unicorn" and an explicitly written config.ru: ------------ config.ru ------------- ENV["RAILS_ENV"] ||=3D ENV["RACK_ENV"] require 'config/boot' require 'config/environment' require 'unicorn/app/old_rails' require 'unwritten_timeout_middleware' use UnwrittenTimeoutMiddleware # :) use Unicorn::App::OldRails::Static # optional run Unicorn::App::OldRails.new ------------------------------------ > Thank you for Unicorn ! :) No problem :) -- = Eric Wong _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying