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

- old
+ new

@@ -58,10 +58,13 @@ end }, :after_worker_ready => lambda { |server, worker| server.logger.info("worker=#{worker.nr} gen=#{worker.generation} ready") }, + :after_monitor_ready => lambda { |server| + server.logger.info("Monitor pid=#{Process.pid} ready") + }, :after_worker_timeout => nil, :after_worker_hard_timeout => nil, :after_request_complete => nil, :early_hints => false, :refork_condition => nil, @@ -137,9 +140,13 @@ set_hook(:after_mold_fork, block_given? ? block : args[0]) end def after_worker_ready(*args, &block) set_hook(:after_worker_ready, block_given? ? block : args[0]) + end + + def after_monitor_ready(*args, &block) + set_hook(:after_monitor_ready, block_given? ? block : args[0], 1) end def after_worker_timeout(*args, &block) set_hook(:after_worker_timeout, block_given? ? block : args[0], 3) end