lib/example.rb in gvarela-bluepill-0.0.27 vs lib/example.rb in gvarela-bluepill-0.0.28

- old
+ new

@@ -1,10 +1,11 @@ require 'rubygems' require 'bluepill' require 'logger' ROOT_DIR = "/tmp/bp" +user = ENV['USER'] # Watch with # watch -n0.2 'ps axu | egrep "(CPU|forking|bluepill|sleep)" | grep -v grep | sort' Bluepill.application(:sample_app) do |app| 0.times do |i| @@ -12,18 +13,18 @@ process.pid_file = "#{ROOT_DIR}/pids/process_#{i}.pid" # I could not figure out a portable way to # specify the path to the sample forking server across the diff developer laptops. # Since this code is eval'ed we cannot reliably use __FILE__ - process.start_command = "/Users/rohith/work/bluepill/bin/sample_forking_server #{4242 + i}" + process.start_command = "/Users/#{user}/work/gems/bluepill/bin/sample_forking_server #{4242 + i}" process.stop_command = "kill -INT {{PID}}" process.daemonize = true process.start_grace_time = 1.seconds process.restart_grace_time = 7.seconds process.stop_grace_time = 7.seconds - process.uid = "rohith" + process.uid = user process.gid = "staff" # process.checks :cpu_usage, :every => 10, :below => 0.5, :times => [5, 5] process.checks :flapping, :times => 2, :within => 30.seconds, :retry_in => 7.seconds \ No newline at end of file