Skip to content

Instantly share code, notes, and snippets.

@tachiba
Forked from tsmango/monitor-redis-resque.rb
Created August 3, 2012 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tachiba/3247524 to your computer and use it in GitHub Desktop.
Save tachiba/3247524 to your computer and use it in GitHub Desktop.
# Redis
%w{6379}.each do |port|
God.watch do |w|
w.name = "redis"
w.interval = 30.seconds
w.start = "/etc/init.d/redis start"
w.stop = "/etc/init.d/redis stop"
w.restart = "/etc/init.d/redis restart"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = "/var/run/redis.pid"
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment