I'm trying to monitor a tweetstream daemon with God.. my god config is very simple:
path = File.expand_path(File.dirname(__FILE__))
God.watch do |w|
w.name = "tweet.rb"
w.start = "bundle exec ruby #{path}/tweet.rb start"
w.keepalive
end
While my tweetstream daemon is a standard implementation of that as well.. when I start the god process it seems to cycle through starting the process over and over and over... I'm not sure if its failing to start, or if its starting then shutting down.. or I guess I don't know how to interpret this.. any help is appreciated: some sample output:
I [2012-01-22 23:43:53] INFO: tweet.rb moved 'up' to 'start'
I [2012-01-22 23:43:53] INFO: tweet.rb [trigger] process is running (ProcessRunning)
I [2012-01-22 23:43:53] INFO: tweet.rb move 'start' to 'up'
I [2012-01-22 23:43:53] INFO: tweet.rb registered 'proc_exit' event for pid 74646
I [2012-01-22 23:43:53] INFO: tweet.rb moved 'start' to 'up'
I [2012-01-22 23:43:54] INFO: tweet.rb [trigger] process 74646 exited (ProcessExits)
I [2012-01-22 23:43:54] INFO: tweet.rb move 'up' to 'start'
I [2012-01-22 23:43:54] INFO: tweet.rb deregistered 'proc_exit' event for pid 74646
I [2012-01-22 23:43:54] INFO: tweet.rb start: bundle exec rub /Users/Kevin/Documents/Code/Rails/work/TalkSumo/script/tweet.rb start
I [2012-01-22 23:43:54] INFO: tweet.rb moved 'up' to 'start'
I [2012-01-22 23:43:54] INFO: tweet.rb [trigger] process is running (ProcessRunning)
I [2012-01-22 23:43:54] INFO: tweet.rb move 'start' to 'up'
I [2012-01-22 23:43:54] INFO: tweet.rb registered 'proc_exit' event for pid 74648
I [2012-01-22 23:43:54] INFO: tweet.rb moved 'start' to 'up'
I [2012-01-22 23:43:54] INFO: tweet.rb [trigger] process 74648 exited (ProcessExits)
I [2012-01-22 23:43:54] INFO: tweet.rb move 'up' to 'start'
I [2012-01-22 23:43:54] INFO: tweet.rb deregistered 'proc_exit' event for pid 74648
I [2012-01-22 23:43:54] INFO: tweet.rb start: bundle exec ruby /Users/Kevin/Documents/Code/Rails/work/TalkSumo/script/tweet.rb star
If I remove bundle exec and just use:
w.start = "ruby #{path}/tweet.rb start"
The error log changes to:
I [2012-01-23 10:41:25] INFO: tweet.rb [ok] process is not running (ProcessRunning)
I [2012-01-23 10:41:30] INFO: tweet.rb [ok] process is not running (ProcessRunning)
I [2012-01-23 10:41:35] INFO: tweet.rb [ok] process is not running (ProcessRunning)
I [2012-01-23 10:41:40] INFO: tweet.rb [ok] process is not running (ProcessRunning)
I [2012-01-23 10:41:45] INFO: tweet.rb [ok] process is not running (ProcessRunning)