diff options
author | Eric Wong <e@80x24.org> | 2013-10-30 18:32:53 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-10-31 05:04:30 +0000 |
commit | 3741b945dcaf2e432f9e0088b4553d17f5c68f2b (patch) | |
tree | 716e849598eb744e488b1de68309b92c817a0703 /lib/yahns/config.rb | |
parent | bfe699496ced8f73f659da0f0857fda614fb40b6 (diff) | |
download | yahns-3741b945dcaf2e432f9e0088b4553d17f5c68f2b.tar.gz |
Otherwise, the server may stay running forever if a client chooses to stay forever (and there is no FD pressure).
Diffstat (limited to 'lib/yahns/config.rb')
-rw-r--r-- | lib/yahns/config.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb index c4c1b41..e48ba4e 100644 --- a/lib/yahns/config.rb +++ b/lib/yahns/config.rb @@ -73,6 +73,11 @@ class Yahns::Config # :nodoc: end end + def shutdown_timeout(sec) + var = _check_in_block(nil, :shutdown_timeout) + @set[var] = _check_int(var, sec, 0) + end + def worker_processes(nr, &blk) var =_check_in_block(nil, :worker_processes) @set[var] = _check_int(var, nr, 1) @@ -392,7 +397,7 @@ class Yahns::Config # :nodoc: io.sync = true end - [ :logger, :pid, :worker_processes, :user, + [ :logger, :pid, :worker_processes, :user, :shutdown_timeout, :worker_atfork_prepare, :worker_atfork_parent, :worker_atfork_child ].each do |var| val = @set[var] |