diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-10 12:06:25 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-10 12:23:15 -0800 |
commit | a824b346dabe9c24f63c6764d0f9629ff2daf9eb (patch) | |
tree | 94b6cd0abc52dc31b5a535091373831fca0675f2 /bin/unicorn-hello-world | |
parent | 36573963a235fd1016ce978667ab83eb40011061 (diff) | |
download | unicorn-a824b346dabe9c24f63c6764d0f9629ff2daf9eb.tar.gz |
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.
Diffstat (limited to 'bin/unicorn-hello-world')
-rwxr-xr-x | bin/unicorn-hello-world | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/unicorn-hello-world b/bin/unicorn-hello-world index 2aba773..8d77ea1 100755 --- a/bin/unicorn-hello-world +++ b/bin/unicorn-hello-world @@ -22,5 +22,6 @@ end # make sure this hash is the last statement, as this is eval-ed by unicorn { # :listeners => %w(0.0.0.0:8080 127.0.0.1:7701 /tmp/test.sock), + # :hot_config_file => "/tmp/hot_config", :app => HelloWorld.new, } |