[Refs #196] Fix bluepill and DJ option for deploy and restarting
This commit is contained in:
parent
ab2398de53
commit
5cc32d61c2
|
@ -62,8 +62,9 @@ namespace :deploy do
|
|||
end
|
||||
|
||||
after "deploy:update_code", "deploy:symlink_all", "deploy:migrate"
|
||||
after "deploy:update", "bluepill:quit", "bluepill:start"
|
||||
after "deploy:setup", "deploy:symlink_pids"
|
||||
after "deploy:restart", "bluepill:start" # "bluepill:processes:restart_dj" # "bluepill:restart"
|
||||
after "deploy:restart", "bluepill:quit", "bluepill:start"
|
||||
after "deploy:restart", "deploy:cleanup"
|
||||
|
||||
require 'cape'
|
||||
|
|
|
@ -9,9 +9,8 @@ Bluepill.application(app_name) do |app|
|
|||
process.stop_grace_time = 10.seconds
|
||||
process.restart_grace_time = 10.seconds
|
||||
|
||||
process.start_command = "/usr/bin/env RAILS_ENV=production script/delayed_job start"
|
||||
process.stop_command = "/usr/bin/env RAILS_ENV=production script/delayed_job stop"
|
||||
process.restart_command = "/usr/bin/env RAILS_ENV=production script/delayed_job restart"
|
||||
process.start_command = "/usr/bin/env ruby script/delayed_job start"
|
||||
process.stop_command = "/usr/bin/env ruby script/delayed_job stop"
|
||||
process.pid_file = File.join(app.working_dir, 'tmp', 'pids', 'delayed_job.pid')
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|||
end
|
||||
|
||||
desc "Quit bluepill"
|
||||
task :stop, :roles => [:app] do
|
||||
task :quit, :roles => [:app] do
|
||||
run "cd #{fetch :current_path} && #{try_sudo} #{bluepill_binary} #{fetch :application} stop"
|
||||
run "cd #{fetch :current_path} && #{try_sudo} #{bluepill_binary} #{fetch :application} quit"
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
ENV['RAILS_ENV'] ||= "production"
|
||||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
|
||||
require 'delayed/command'
|
||||
Delayed::Command.new(ARGV).daemonize
|
||||
|
|
Loading…
Reference in New Issue