add hot_config_file config parameter
commita824b346dabe9c24f63c6764d0f9629ff2daf9eb
authorEric Wong <normalperson@yhbt.net>
Tue, 10 Feb 2009 20:06:25 +0000 (10 12:06 -0800)
committerEric Wong <normalperson@yhbt.net>
Tue, 10 Feb 2009 20:23:15 +0000 (10 12:23 -0800)
tree94b6cd0abc52dc31b5a535091373831fca0675f2
parent36573963a235fd1016ce978667ab83eb40011061
add hot_config_file config parameter

This allows changing certain variables without restarting the
master process or code reload.  Currently, only the following
variables are supported: @timeout, @nr_workers, @hot_config_file.

Any other config changes will/should require re-executing the
running binary.  This config file is run through eval(); so it
really users plenty of rope to hang themselves with.  Of course,
it requires valid Ruby syntax:

------------------------- 8< ------------------------
@nr_workers = 8
@timeout = 15
@hot_config_file = "/var/tmp/new_hot_config_file"
------------------------- 8< ------------------------

Lowering the timeout will trigger all existing workers to be
gracefully stopped and restarted.

This file is loaded at startup, and overrides any config
settings that may already be loaded.
bin/unicorn-hello-world
lib/unicorn.rb