Skip to content

Commit

Permalink
Changed task
Browse files Browse the repository at this point in the history
  • Loading branch information
strtwtsn committed Jan 29, 2021
1 parent 158b64b commit 2300d71
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ group :development do
gem 'capistrano-git-with-submodules', '2.0.3'
gem 'capistrano-service'
gem 'awesome_print'

# gem 'listen', '~> 3.1.5'
# gem 'spring-watcher-listen', '~> 2.0.0'
#
2 changes: 1 addition & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
@@ -32,5 +32,5 @@
namespace :deploy do
after :publishing, 'service:pp_default:restart'
after :publishing, 'service:pp_import:restart'
after :finishing, 'clear:cache'
after :published, 'deploy:clear_cache'
end
17 changes: 8 additions & 9 deletions lib/capistrano/tasks/cache.rake
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
namespace :clear do
desc 'clear rails cache'
task :cache do
on roles(:app) do
within "#{current_path}" do
with rails_env: "#{fetch(:stage)}" do
execute :rake, "cache:clear"
namespace :deploy do
task :clear_cache do
on roles(:app) do |host|
with rails_env: fetch(:rails_env) do
within current_path do
execute :rake, "cache:clear"
end
end
end
end
end
end
end

0 comments on commit 2300d71

Please sign in to comment.