lib/caploy/recipes/unicorn.rb in caploy-0.1.5 vs lib/caploy/recipes/unicorn.rb in caploy-0.1.6

- old
+ new

@@ -101,32 +101,31 @@ else logger.important("Config file for \"#{unicorn_env}\" environment was not found at \"#{config_path}\"", "Unicorn") end end end - end - after "deploy:restart", "unicorn:reload" - - desc "Setup unicorn" - task :setup, :roles => :app, :except => {:no_release => true} do - run "mkdir -p \"#{shared_path}/config/unicorn\"" - config_path = "#{shared_path}/config/unicorn/#{rails_env}.rb" - template_path = File.expand_path('../../templates/unicorn/unicorn.rb.erb', __FILE__) - vars = { - 'application' => application, - 'current_path' => current_path, - 'unicorn_pid' => unicorn_pid, - 'unicorn_std_log' => unicorn_std_log, - 'unicorn_err_log' => unicorn_err_log, - 'stage' => stage, - 'unicorn_listen_backlog' => unicorn_listen_backlog, - 'unicorn_worker_processes' => unicorn_worker_processes, - 'sidekiq_redis_count' => sidekiq_redis_count - } - put(render_erb_template(template_path, vars), config_path) + desc "Setup unicorn" + task :setup, :roles => :app, :except => {:no_release => true} do + run "mkdir -p \"#{shared_path}/config/unicorn\"" + config_path = "#{shared_path}/config/unicorn/#{rails_env}.rb" + template_path = File.expand_path('../../templates/unicorn/unicorn.rb.erb', __FILE__) + vars = { + 'application' => application, + 'current_path' => current_path, + 'unicorn_pid' => unicorn_pid, + 'unicorn_std_log' => unicorn_std_log, + 'unicorn_err_log' => unicorn_err_log, + 'stage' => stage, + 'unicorn_listen_backlog' => unicorn_listen_backlog, + 'unicorn_worker_processes' => unicorn_worker_processes, + 'sidekiq_redis_count' => sidekiq_redis_count + } + put(render_erb_template(template_path, vars), config_path) + end end + after :"deploy:restart", :"unicorn:reload" after :"deploy:setup", :"unicorn:setup"; namespace :deploy do task :start, :roles => :app do unicorn.start