alexch/rerun — Issue #17: Add the ability to prewarm a command rerun will run
Author: philc
Created: 2012-02-29 22:05:36+00:00
State: open

Web apps can take a few seconds to startup. For these apps, when used with rerun, the developer experience isn't great -- after making a change, the server will be down for a few seconds as rerun restarts it. This is annoying for workflows where you're immediately running integration tests after a change or previewing the changes in a browser window right away.

What I'll probably try in the short term is to write a daemon which does some initialization work (like requiring expensive gems) and then fork the webapp. I'll then have rerun send that script signals when files change which will cause a refork.

I don't know of a good solution that fits within the clean scope of rerun, but I wanted to see if you had any ideas. It would be nice if rerun provided some assistance solving this problem, like allowing you to specify a pre-fork and post-fork script (assuming they're both in Ruby).