6 w.name = "child-events"
8 w.start = File.join(GOD_ROOT, *%w[test configs child_events simple_server.rb])
9 w.log = File.join(GOD_ROOT, *%w[test configs child_events god.log])
11 # determine the state on startup
12 w.transition(:init, { true => :up, false => :start }) do |on|
13 on.condition(:process_running) do |c|
18 # determine when process has finished starting
19 w.transition([:start, :restart], :up) do |on|
20 on.condition(:process_running) do |c|
25 on.condition(:tries) do |c|
31 # start if process is not running
32 w.transition(:up, :start) do |on|
33 on.condition(:process_exits)
38 on.condition(:flapping) do |c|
39 c.to_state = [:start, :restart]
42 c.transition = :unmonitored
43 c.retry_in = 10.seconds
45 c.retry_within = 5.minutes