how to monitor and restart two ruby scripts with God? -


i have been able run single god file single ruby script such:

god.watch |w|   w.name = "twilio"   w.start = "ruby ~/code/site/iron.io/twilio-listen.rb"   w.keepalive end 

but have 2 scripts , want have god watch both of them (twilio-listen.rb , slack-listen.rb)

how do that?

you should able specify watches both in same god config file. might want add group called listeners if ever needed stop or restart them together. e.g.,

god.watch |w|   w.name = "twilio"   w.group = "listeners"   w.start = "ruby ~/code/site/iron.io/twilio-listen.rb"   w.keepalive end  god.watch |w|   w.name = "slack"   w.group = "listeners"   w.start = "ruby ~/code/site/iron.io/slack-listen.rb"   w.keepalive end 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -