examples/example.rb in bluepill-0.0.49 vs examples/example.rb in bluepill-0.0.50
- old
+ new
@@ -9,10 +9,13 @@
Bluepill.application(:sample_app) do |app|
0.times do |i|
app.process("process_#{i}") do |process|
process.pid_file = "#{ROOT_DIR}/pids/process_#{i}.pid"
+ # Example of use of pid_command option to find memcached process
+ # process.pid_command = "ps -ef | awk '/memcached$/{ print $2 }'"
+
# 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.stop_command = "kill -INT {{PID}}"
@@ -61,10 +64,12 @@
end
end
1.times do |i|
app.process("group_process_#{i}") do |process|
+ process.auto_start = false
+
process.uid = "rohith"
process.gid = "wheel"
process.stderr = "/tmp/err.log"
process.stdout = "/tmp/err.log"
@@ -77,5 +82,6 @@
# process.checks :always_true, :every => 5
end
end
end
+