Created
November 25, 2011 22:46
-
-
Save febuiles/1394598 to your computer and use it in GitHub Desktop.
God config for Hubot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start the service with `god -c /etc/god/god.conf`. Use `rvmsudo` if you | |
# manage your rubies with RVM. | |
# You can see the start/stop script for Hubot at: https://gist.github.com/1394520 | |
God.watch do |w| | |
w.name = "hubot" | |
w.start = "/etc/init.d/hubot start" | |
w.stop = "/etc/init.d/hubot stop" | |
w.restart = "/etc/init.d/hubot restart" | |
w.start_grace = 5.seconds | |
w.restart_grace = 5.seconds | |
w.pid_file = "/var/run/hubot.pid" | |
w.log = '/var/log/hubot/hubot.log' | |
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 | |
w.lifecycle do |on| | |
on.condition(:flapping) do |c| | |
c.to_state = [:start, :restart] | |
c.times = 5 | |
c.within = 5.minute | |
c.transition = :unmonitored | |
c.retry_in = 10.minutes | |
c.retry_times = 5 | |
c.retry_within = 2.hours | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment