public
Fork of mojombo/god
Description: Ruby process monitor
Homepage: http://god.rubyforge.org
Clone URL: git://github.com/Bertg/god.git
god / test / configs / stress / stress.god
100644 15 lines (14 sloc) 0.337 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
('01'..'40').each do |i|
  God.watch do |w|
    w.name = "stress-#{i}"
    w.start = "ruby " + File.join(File.dirname(__FILE__), *%w[simple_server.rb])
    w.interval = 1
    w.grace = 2
    w.group = 'test'
  
    w.start_if do |start|
      start.condition(:process_running) do |c|
        c.running = false
      end
    end
  end
end