From pratiknaik at gmail.com Fri Aug 5 17:24:21 2011 From: pratiknaik at gmail.com (Pratik Naik) Date: Fri, 5 Aug 2011 22:24:21 +0100 Subject: [PATCH] Remove deprecated Rainbows::HttpResponse Message-ID: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> --- lib/rainbows.rb | 1 - lib/rainbows/http_response.rb | 26 -------------------------- 2 files changed, 0 insertions(+), 27 deletions(-) delete mode 100644 lib/rainbows/http_response.rb diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 3bf7717..bfa1ba0 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -121,7 +121,6 @@ module Rainbows autoload :Fiber, 'rainbows/fiber' # core class autoload :StreamFile, 'rainbows/stream_file' - autoload :HttpResponse, 'rainbows/http_response' # deprecated autoload :ThreadTimeout, 'rainbows/thread_timeout' autoload :WorkerYield, 'rainbows/worker_yield' autoload :SyncClose, 'rainbows/sync_close' diff --git a/lib/rainbows/http_response.rb b/lib/rainbows/http_response.rb deleted file mode 100644 index 564d2d0..0000000 --- a/lib/rainbows/http_response.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -*- encoding: binary -*- -# :enddoc: -# deprecated, use Rainbows::Response instead -# Cramp 0.11 relies on this, and is only activated by Cramp -if defined?(Cramp) && defined?(Rainbows::EventMachine::Client) - class Rainbows::HttpResponse - # dummy method for Cramp to alias_method_chain - def self.write(client, response, out) - end - end - - module Rainbows::EventMachine::CrampSocket - def em_write_response(response, alive = false) - if websocket? - write web_socket_upgrade_data - web_socket_handshake! - response[1] = nil # disable response headers - end - super - end - end - - class Rainbows::EventMachine::Client - include Rainbows::EventMachine::CrampSocket - end -end -- 1.7.3.4 From normalperson at yhbt.net Fri Aug 5 18:07:14 2011 From: normalperson at yhbt.net (Eric Wong) Date: Fri, 5 Aug 2011 22:07:14 +0000 Subject: [PATCH] Remove deprecated Rainbows::HttpResponse In-Reply-To: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> References: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> Message-ID: <20110805220714.GA6456@dcvr.yhbt.net> Thanks! Is the next version of Cramp ready-to-release soonish? The test suite currently relies on 0.13 and it fails with this patch applied, but cramp.git now relies on my latest changes to rainbows.git... So does the chicken or egg come first? :) I will hold off on applying this patch until the next Cramp is out, http_response.rb shouldn't break anything just by being in the Rainbows! tree another release. I suppose I can release the current rainbows.git as Rainbows! 4.2.0 today (a good version number :D) just for Cramp. -- Eric Wong From pratiknaik at gmail.com Fri Aug 5 18:27:04 2011 From: pratiknaik at gmail.com (Pratik) Date: Fri, 5 Aug 2011 23:27:04 +0100 Subject: [PATCH] Remove deprecated Rainbows::HttpResponse In-Reply-To: <20110805220714.GA6456@dcvr.yhbt.net> References: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> <20110805220714.GA6456@dcvr.yhbt.net> Message-ID: On 5 August 2011 23:07, Eric Wong wrote: > I suppose I can release the current rainbows.git as Rainbows! 4.2.0 > today (a good version number :D) just for Cramp. Perfect. I just released cramp 0.14. Waiting for Rainbows! 4.2.0 :) > > -- > Eric Wong > -- Programmer @ 37signals | http://twitter.com/lifo | http://m.onkey.org From normalperson at yhbt.net Fri Aug 5 19:45:15 2011 From: normalperson at yhbt.net (Eric Wong) Date: Fri, 5 Aug 2011 23:45:15 +0000 Subject: [ANN] Rainbows! 4.2.0 - Cramp WebSocket updates! Message-ID: <20110805234515.GA13025@dcvr.yhbt.net> Changes: This release includes updates to support WebSockets under Cramp 0.14 and later. This will be the last release which supports Cramp 0.13. There are no changes in this release for non-Cramp users. * http://rainbows.rubyforge.org/ * rainbows-talk at rubyforge.org * git://bogomips.org/rainbows.git -- Eric Wong From normalperson at yhbt.net Fri Aug 5 19:51:44 2011 From: normalperson at yhbt.net (Eric Wong) Date: Fri, 5 Aug 2011 16:51:44 -0700 Subject: [PATCH] Remove deprecated Rainbows::HttpResponse In-Reply-To: References: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> <20110805220714.GA6456@dcvr.yhbt.net> Message-ID: <20110805235144.GA27634@dcvr.yhbt.net> Pratik wrote: > On 5 August 2011 23:07, Eric Wong wrote: > > I suppose I can release the current rainbows.git as Rainbows! 4.2.0 > > today (a good version number :D) just for Cramp. > > Perfect. I just released cramp 0.14. Waiting for Rainbows! 4.2.0 :) Just released 4.2.0 and have HttpResponse removal queued up for 4.3.0. I suppose Cramp has a smallish userbase and nobody's going to be stuck on 0.13 and unable to upgrade, right? -- Eric Wong From pratiknaik at gmail.com Sat Aug 6 11:20:31 2011 From: pratiknaik at gmail.com (Pratik) Date: Sat, 6 Aug 2011 16:20:31 +0100 Subject: [PATCH] Remove deprecated Rainbows::HttpResponse In-Reply-To: <20110805235144.GA27634@dcvr.yhbt.net> References: <1312579461-17223-1-git-send-email-pratiknaik@gmail.com> <20110805220714.GA6456@dcvr.yhbt.net> <20110805235144.GA27634@dcvr.yhbt.net> Message-ID: On 6 August 2011 00:51, Eric Wong wrote: > Just released 4.2.0 and have HttpResponse removal queued up for 4.3.0. > > I suppose Cramp has a smallish userbase and nobody's going to be > stuck on 0.13 and unable to upgrade, right? Thanks! Yup I'm pretty sure no one will be stuck on 0.13. -- Programmer @ 37signals | http://twitter.com/lifo | http://m.onkey.org From normalperson at yhbt.net Fri Aug 19 21:47:54 2011 From: normalperson at yhbt.net (Eric Wong) Date: Sat, 20 Aug 2011 01:47:54 +0000 Subject: [ANN] Rainbows! 4.3.0 and Zbatery 4.1.0 Message-ID: <20110820014754.GA22553@dcvr.yhbt.net> Changes: These releases pull in changes from unicorn 4.1.0 The deprecated Rainbows::HttpResponse class is finally gone thanks to Pratik Naik. Logging of errors is more consistent with the changes in unicorn 4.1.0. There are also minor documentation updates. See the unicorn 4.1.0 release notes for more details: http://bogomips.org/unicorn.git/tag/?id=v4.1.0 * http://rainbows.rubyforge.org/ * git://bogomips.org/rainbows.git * http://rainbows.rubyforge.org/NEWS.atom.xml Zbatery is Rainbows! without the fork(): * git://bogomips.org/zbatery.git * http://zbatery.bogomip.org/ * http://zbatery.bogomip.org/NEWS.atom.xml The mailing list for both projects is rainbows-talk at rubyforge.org -- Eric Wong From marinaakikaa at hotmail.com Thu Aug 18 12:15:55 2011 From: marinaakikaa at hotmail.com (Miss Marina Akika) Date: Thu, 18 Aug 2011 09:15:55 -0700 Subject: Olá queridos Message-ID: Ol? queridos, Como voc? est? hoje?, Eu sei que esta proposta pode ser uma surpresa para voc?, mas n?o consider?-la como uma emerg?ncia. Eu introduzir o meu eu como Miss Marina Akika. 21 anos de idade, da Costa do Marfim na ?frica Ocidental), agora ficar no Dakar de refugiados Senegal sob a casa da ONU destitu?dos. Eu sou a ?nica filha do falecido Dr. thomas Akika. o diretor-gerente do Frio bem-Ouro e Diamante em Empresa (Yamoussoukro) Costa do Marfim. Mas ele foi morto ao lado com minha m?e durante o guerra civil pol?tica e todas as suas propriedades foi totalmente destru?da. No entanto, ap?s sua morte, conseguiu escapar com um dep?sito de documentos muito importantes CERTIFICADO de sete milh?es 450 mil estados unidos dollars.USD ($ 7.450,000.00) em uma empresa de finan?as que eu sou o parente mais pr?ximo. Eu procuro uma pessoa digna de confian?a externa para me ajudar alcan?ar meus fundo falecido pai por causa da minha situa??o here.I tem o seu contacto a partir deste www.airlineengineering asiapacific.com. Eu estarei de bom grado para dar-lhe 25% do montante total para a sua entrada assist?ncia. 5% para todas as despesas que voc? fez para ver que esta transfer?ncia se com sucesso. por favor ? muito importante que voc? entre em contato comigo imediatamente este e-mail meu privada Endere?o: marina_akika at yahoo.com para maiores explica??es sobre como vamos proceder, sou uma menina falando Ingl?s usando tradutor para voc?, Aguardando sua imediata resposta, Obrigado e que Deus aben?oe. Atenciosamente Senhorita Marina Akika. CONTATO: marina_akika at yahoo.com ____________________________________________________________________________________________ Hello Dear, How are you today?, I know that this proposal might be a surprise to you but do consider it as an emergency. I introducing my self as Miss Marina Akika. 21years of age, from ivory coast in West Africa),now staying in refugee Dakar Senegal under the UN destitute home. I am the only Daughter of late Dr. thomas Akika. the managing director of Cold-well Gold and Diamond Company in (Yamoussoukro) ivory coast. But he was killed along side with my mother during the political civil war and all his properties was totally destroyed. However after their death I managed to escape with a very important documents DEPOSIT CERTIFICATE of Seven million four hundred fifty thousand united states dollars.USD ($7.450,000.00) in a finances company which i am the next of kin. I seek a trust worthy foreign person to assist me achieve my late father fund because of my situation here.I got your contact from this www.airlineengineering-asiapacific.com. I will be gladly to give you 25% of the total sum for your assistance input. 5% for any expenses you made to see that this transfer come up successfully. please it is very important you contact me immediately on this my private email address: marina_akika at yahoo.com for further explanation on how we will proceed,Am an english speaking girl using translator to you, Awaiting your immediate response, Thanks and God bless. Best Regards Miss Marina Akika. CONTACT: marina_akika at yahoo.com From normalperson at yhbt.net Tue Aug 30 19:32:32 2011 From: normalperson at yhbt.net (Eric Wong) Date: Tue, 30 Aug 2011 23:32:32 +0000 Subject: [PATCH] avoid potential Logger deadlock in SIGQUIT and SIGUSR1 Message-ID: <20110830233232.GA19633@dcvr.yhbt.net> If any combination of SIGQUIT and SIGUSR1 are sent to a Rainbows! worker in a /very/ short period of time, the Mutex used by the default Logger implementation may deadlock since Mutex synchronization is not reentrant-safe. Users of alternative logger implementations (or monkey-patched ones) are possibly not affected. Users of the logger_mp_safe.rb monkey-patch distributed[1] with unicorn are not affected. [1] http://unicorn.bogomips.org/examples/logger_mp_safe.rb --- I've pushed to rainbows.git I haven't seen Rainbows! hit it, but I've encountered this elsewhere. I don't have anything else for a bit, so maybe I'll just release 4.3.1 tonight. Anybody have any other outstanding issues? lib/rainbows/base.rb | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/rainbows/base.rb b/lib/rainbows/base.rb index d1c5c08..54f1d2d 100644 --- a/lib/rainbows/base.rb +++ b/lib/rainbows/base.rb @@ -18,8 +18,11 @@ module Rainbows::Base # we're don't use the self-pipe mechanism in the Rainbows! worker # since we don't defer reopening logs Rainbows::HttpServer::SELF_PIPE.each { |x| x.close }.clear - trap(:USR1) { reopen_worker_logs(worker.nr) } - trap(:QUIT) { Rainbows.quit! } + + # spawn Threads since Logger takes a mutex by default and + # we can't safely lock a mutex in a signal handler + trap(:USR1) { Thread.new { reopen_worker_logs(worker.nr) } } + trap(:QUIT) { Thread.new { Rainbows.quit! } } [:TERM, :INT].each { |sig| trap(sig) { exit!(0) } } # instant shutdown Rainbows::ProcessClient.const_set(:APP, Rainbows.server.app) logger.info "Rainbows! #@use worker_connections=#@worker_connections" -- Eric Wong