No description, website, or topics provided.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Bluepill Example

Bluepill is a simple process monitoring tool written in Ruby. See

The pill file in this repo is an example of using it to start multiple worker processes running the same script.

Bluepill.application("my_app") do |app|
	5.times do |i|
		app.process("my_worker_#{i}") do |process| = "workers"
			process.working_dir = "/my/working/directory"
			process.start_command = "/my/working/directory/worker_script.rb"
			process.pid_file = "/var/run/bluepill/worker_script_#{i}.pid"
			process.daemonize = true
			process.uid = "someuser"
			process.gid = "somegroup"
			process.start_grace_time = 3.seconds
			process.stop_grace_time = 7.seconds
			process.restart_grace_time = 10.seconds

Starting the processes

Under rvm, as a user other than root, you can load up the workers using:

rvmsudo bluepill load bluepill_workers.pill

Make sure that the user you specify in the pill has write permissions on the pid_file directory you specified.

You might also find some help here: