lib/pitchfork/configurator.rb in pitchfork-0.8.0 vs lib/pitchfork/configurator.rb in pitchfork-0.9.0

- old
+ new

@@ -31,10 +31,11 @@ default_logger.progname = "[Pitchfork]" DEFAULTS = { :soft_timeout => 20, :cleanup_timeout => 2, + :spawn_timeout => 10, :timeout => 22, :logger => default_logger, :worker_processes => 1, :after_worker_fork => lambda { |server, worker| server.logger.info("worker=#{worker.nr} gen=#{worker.generation} pid=#{$$} spawned") @@ -170,9 +171,13 @@ def timeout(seconds, cleanup: 2) soft_timeout = set_int(:soft_timeout, seconds, 3) cleanup_timeout = set_int(:cleanup_timeout, cleanup, 2) set_int(:timeout, soft_timeout + cleanup_timeout, 5) + end + + def spawn_timeout(seconds) + set_int(:spawn_timeout, seconds, 1) end def worker_processes(nr) set_int(:worker_processes, nr, 1) end