capistrano-deploy-management 0.1.40 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'capistrano-deploy-management'
|
4
4
|
s.description = 'Collection of Capistrano recipes for deploying Rails apps into high-performance environments'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.41'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ['Dominik Rodler']
|
8
8
|
s.email = ['dominik.rodler@gmail.com']
|
data/changelog.md
CHANGED
@@ -8,13 +8,14 @@ module CapistranoDeployManagement
|
|
8
8
|
# set(:unicorn_pidfile) { "#{deploy_to}/shared/pids/unicorn.pid" }
|
9
9
|
# set(:unicorn_pid) { "cat #{deploy_to}/shared/pids/unicorn.pid" }
|
10
10
|
set(:unicorn_pidfile) { "#{previous_release}/tmp/pids/unicorn.pid" }
|
11
|
+
set(:unicorn_pid) { "cat #{previous_release}/tmp/pids/unicorn.pid" }
|
11
12
|
|
12
13
|
namespace :unicorn do
|
13
14
|
desc 'Restart unicorn.'
|
14
15
|
task :restart, :roles => :app do
|
15
|
-
run "if [ -f #{unicorn_pidfile} ] && [ -e
|
16
|
-
|
17
|
-
|
16
|
+
# run "if [ -f #{unicorn_pidfile} ] && [ -e `cat #{unicorn_pidfile}` ]; then #{try_sudo} kill -s USR2 $unicorn_pid; else cd #{current_path} && bundle exec unicorn -c #{unicorn_config} -E #{rails_env} -D; fi"
|
17
|
+
unicorn.stop
|
18
|
+
unicorn.start
|
18
19
|
end
|
19
20
|
|
20
21
|
desc 'Start unicorn.'
|
@@ -24,7 +25,7 @@ module CapistranoDeployManagement
|
|
24
25
|
|
25
26
|
desc 'Stop unicorn.'
|
26
27
|
task :stop, :roles => :app do
|
27
|
-
run "cd #{current_path} && test -s #{unicorn_pidfile} && #{try_sudo} kill -QUIT
|
28
|
+
run "cd #{current_path} && test -s #{unicorn_pidfile} && #{try_sudo} kill -QUIT $unicorn_pid || echo 'Unicorn not running. Nothing to kill.'"
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|