Sha256: 2863a26f857a105ce88eba873d3f626a29e0f78e00b36c1d6f9a1c7791fe26f7

Contents?: true

Size: 795 Bytes

Versions: 12

Compression:

Stored size: 795 Bytes

Contents

God.watch do |w|
  w.name = 'child-polls'
  w.start = File.join(GOD_ROOT, *%w[test configs child_polls simple_server.rb])
  w.interval = 5
  w.grace = 2

  w.start_if do |start|
    start.condition(:process_running) do |c|
      c.running = false
    end
  end

  w.restart_if do |restart|
    restart.condition(:cpu_usage) do |c|
      c.above = 30.percent
      c.times = [3, 5]
    end

    restart.condition(:memory_usage) do |c|
      c.above = 10.megabytes
      c.times = [3, 5]
    end
  end

  # lifecycle
  w.lifecycle do |on|
    on.condition(:flapping) do |c|
      c.to_state = [:start, :restart]
      c.times = 3
      c.within = 60.seconds
      c.transition = :unmonitored
      c.retry_in = 10.seconds
      c.retry_times = 2
      c.retry_within = 5.minutes
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
resurrected_god-0.14.0 test/configs/child_polls/child_polls.god
mcproc-2016.2.20 test/configs/child_polls/child_polls.god
god-0.13.7 test/configs/child_polls/child_polls.god
god-0.13.6 test/configs/child_polls/child_polls.god
god-0.13.5 test/configs/child_polls/child_polls.god
god-0.13.4 test/configs/child_polls/child_polls.god
god-0.13.3 test/configs/child_polls/child_polls.god
god-0.13.2 test/configs/child_polls/child_polls.god
god-0.13.1 test/configs/child_polls/child_polls.god
god-0.13.0 test/configs/child_polls/child_polls.god
god-0.12.1 test/configs/child_polls/child_polls.god
god-0.12.0 test/configs/child_polls/child_polls.god