Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
God.pid_file_directory = '/tmp/god' God.watch do |w| w.name = 'testscript' w.interval = 10.seconds # default w.start = "cd /tmp/god && ./testscript" w.stop = "kill `/tmp/god/testscript.pid`" w.restart = "sleep 0" w.start_grace = 5.seconds w.behavior(:clean_pid_file) w.start_if do |start| start.condition(:process_running) do |c| c.interval = 5.seconds c.running = false end end end
From the Design Piracy series on my blog: