This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # note - you may need to split into a before-deploy (stop) and after-deploy (start) depending on your setup | |
| desc "Hot-reload God configuration for the Resque worker" | |
| deploy.task :reload_god_config do | |
| sudo "god stop resque" | |
| sudo "god load #{File.join deploy_to, 'current', 'config', 'resque.god'}" | |
| sudo "god start resque" | |
| end | |
| after 'deploy:update_code', 'deploy:update_shared_symlinks' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # delayed job priority ranges. Higher values represent lower priority. | |
| PRIORITY_RANGES = [(0..9), (10..19)] | |
| 2.times do |num| | |
| God.watch do |w| | |
| w.name = "dj-#{num}" | |
| w.group = 'dj' | |
| w.interval = 30.seconds | |
| w.start = "rake -f #{RAILS_ROOT}/Rakefile RAILS_ENV=production MIN_PRIORITY=#{PRIORITY_RANGES[num].first} MAX_PRIORITY=#{PRIORITY_RANGES[num].last} jobs:work" | |
| w.log = "/var/log/god/god.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PID_DIR = '/srv/myapp/shared/pids' | |
| RAILS_ENV = ENV['RAILS_ENV'] = 'production' | |
| RAILS_ROOT = ENV['RAILS_ROOT'] = '/srv/myapp/current' | |
| BIN_PATH = "/home/rails/.rvm/gems/ree-1.8.7-2010.02/bin" | |
| God.log_file = "#{RAILS_ROOT}/log/god.log" | |
| God.log_level = :info | |
| %w(unicorn resque).each do |config| | |
| God.load "#{RAILS_ROOT}/config/god/#{config}.god" |
NewerOlder