使用god监视unicorn
2013年9月17日 19:27
最近使用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