clockwork使用
eventmachine网络学习

使用god监视unicorn

jack posted @ 2013年9月17日 19:27 in ruby with tags ruby gem god , 786 阅读

最近使用nginx+unicorn+sinatra的api服务器要上线了,首选的是易于配置、扩展的gem,god

  • Config file is written in Ruby
  • Easily write your own custom conditions in Ruby
  • Supports both poll and event based conditions
  • Different poll conditions can have different intervals
  • Integrated notification system (write your own too!)
  • Easily control non-daemonizing scripts

简单配置

loop do
  puts 'Hello'
  sleep 1
end

 

God.watch do |w|
  w.name = "unicorn"
  w.start = "ruby /full/path/to/app.rb"
  w.keepalive
end
blog comments powered by Disqus