puma/puma — pull request #478 by rubencaro (2014-02-25 14:16:29+00:00)
Title: Add reload_worker_directory to pumactl

This allows to renew the code directory for newly spawn workers from the master process, all from `pumactl`.

Provides a harmless workaround to https://github.com/puma/puma/pull/469 and https://github.com/puma/puma/issues/468.

This way when I perform a deploy with a `phased-restart` (using symlink deployment), and only after I _ensure this is a good release_, then I do `pumactl reload-worker-directory`. All workers automatically spawn by the master process will use the new code.

I perform two checks to _ensure this is a good release_. First I poll `pumactl stats` until I see the number of `workers` equal the number of `booted_workers`. Then I make a call to some private `\release` path to get the code git release it's running. Then I'm sure every worker is up and they are running the new code.