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