[PATCH] preload_app can take an optional block for warmup
normalperson at yhbt.net
Mon Sep 23 10:58:07 UTC 2013
Aman Gupta <aman at tmm1.net> wrote:
> > In particular, what benefit does this have over putting the same
> > code in config.ru or config/initializer.rb (or similar?)
> With my patch, preload_app yields a rack app object which includes the
> middleware stack. AFAIK there's no way to do this in the context of
> config.ru, since the app is still being built. My goal is to warm up
> the final application that will be serving traffic, including all
Good point. Perhaps this can be triggered via Rack::Builder#to_app
instead, so it can benefit _all_ Rack HTTP servers.
Care to move this discussion over to rack-devel?
There's the odd non-Rack::Builder case, too, but I think everybody just
uses Rack::Builder via config.ru, right?
More information about the mongrel-unicorn