capistrano-deploy-management 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
data/changelog.md
CHANGED
@@ -20,6 +20,13 @@ module CapistranoDeployManagement
|
|
20
20
|
desc 'Clear application cache (e.g. Memcached).'
|
21
21
|
task :refresh_cache, roles: :app do
|
22
22
|
run "cd #{current_path} && rake cache:clear RAILS_ENV=#{rails_env}"
|
23
|
+
# Requires this rake task: (include here!?)
|
24
|
+
# namespace :cache do
|
25
|
+
# desc 'Clear memcache'
|
26
|
+
# task clear: :environment do
|
27
|
+
# Rails.cache.clear
|
28
|
+
# end
|
29
|
+
# end
|
23
30
|
end
|
24
31
|
end
|
25
32
|
end
|
@@ -3,13 +3,14 @@ module CapistranoDeployManagement
|
|
3
3
|
def self.load_into(configuration)
|
4
4
|
configuration.load do
|
5
5
|
|
6
|
-
set(:unicorn_config)
|
7
|
-
set(:unicorn_pidfile) { "
|
6
|
+
set(:unicorn_config) { "#{current_path}/config/unicorn.rb" }
|
7
|
+
set(:unicorn_pidfile) { "#{deploy_to}/shared/pids/unicorn.pid" }
|
8
|
+
set(:unicorn_pid) { "cat #{unicorn_pidfile}" }
|
8
9
|
|
9
10
|
namespace :unicorn do
|
10
11
|
desc 'Restart unicorn.'
|
11
12
|
task :restart, :roles => :app, :except => {:no_release => true} do
|
12
|
-
unicorn.stop
|
13
|
+
# unicorn.stop
|
13
14
|
unicorn.start
|
14
15
|
end
|
15
16
|
|
@@ -20,7 +21,7 @@ module CapistranoDeployManagement
|
|
20
21
|
|
21
22
|
desc 'Stop unicorn.'
|
22
23
|
task :stop, :roles => :app, :except => {:no_release => true} do
|
23
|
-
run "cd #{current_path} && kill $(#{
|
24
|
+
run "if test -s #{unicorn_pidfile}; then cd #{current_path} && kill $(#{unicorn_pid}) fi"
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|