ruby - How to configure god/redis for two environments? -


i want use god monitor redis server. problem in different locations locally , on server. tried doing causes god fail.

%w{6379}.each |port|   god.watch |w|      w.name = "redis"      w.interval = 30.seconds      if rails_env == 'development'       w.start = "/usr/local/bin/redis-server /usr/local/bin"        w.stop = "/usr/local/bin/redis-cli -p 6379 shutdown"      else # in production       w.start = "/usr/local/etc/redis-server /usr/local/etc"        w.stop = "/usr/local/etc/redis-cli -p 6379 shutdown"     end    end  end  

use

if env["rails_env"] == 'development' 

and call script using

rails_env=development sudo god ... 

in dev environment.

and in production:

sudo god ... 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -